mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
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;
|