mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
16 lines
376 B
JavaScript
16 lines
376 B
JavaScript
import Mixin from 'ember-metal/mixin';
|
|
import {isBlank} from 'ember-utils';
|
|
|
|
export default Mixin.create({
|
|
buildURL(_modelName, _id, _snapshot, _requestType, query) {
|
|
let url = this._super(...arguments);
|
|
|
|
if (query && !isBlank(query.slug)) {
|
|
url += `slug/${query.slug}/`;
|
|
delete query.slug;
|
|
}
|
|
|
|
return url;
|
|
}
|
|
});
|