mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
81eb705a37
addresses #2422 - creates settings user controller - creates user model object - updates user fixture to be compatible with user model - updates settings/user template - add validator to Ember Admin - use validator to validate user model is valid - add mock response to /users/me/ path - creates models/base file for all models to inherit from - add mock response to /ghost/changepw/ path
18 lines
366 B
JavaScript
18 lines
366 B
JavaScript
|
|
function ghostPaths() {
|
|
var path = window.location.pathname,
|
|
subdir = path.substr(0, path.search('/ghost/'));
|
|
|
|
return {
|
|
subdir: subdir,
|
|
apiRoot: subdir + '/ghost/api/v0.1'
|
|
};
|
|
}
|
|
|
|
var BaseModel = Ember.Object.extend({
|
|
});
|
|
|
|
BaseModel.apiRoot = ghostPaths().apiRoot;
|
|
BaseModel.subdir = ghostPaths().subdir;
|
|
|
|
export default BaseModel; |