0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/client/app/mixins/slug-url.js

17 lines
370 B
JavaScript
Raw Normal View History

import Ember from 'ember';
const {isBlank} = Ember;
export default Ember.Mixin.create({
buildURL: function (_modelName, _id, _snapshot, _requestType, query) {
let url = this._super(...arguments);
if (query && !isBlank(query.slug)) {
url += `slug/${query.slug}/`;
delete query.slug;
}
return url;
}
});