Ghost/ghost/admin/mirage/config/slugs.js
Austin Burdine 52b6668955 deps: ember-cli-mirage@0.2.0
- remove lodash from bower
- move all resources to /mirage instead of /app/mirage
- update endpoints to use ORM
- general cleanup
2017-01-13 15:59:37 +00:00

20 lines
512 B
JavaScript

import {dasherize} from 'ember-string';
export default function mockSlugs(server) {
server.get('/slugs/post/:slug/', function (schema, request) {
return {
slugs: [
{slug: dasherize(decodeURIComponent(request.params.slug))}
]
};
});
server.get('/slugs/user/:slug/', function (schema, request) {
return {
slugs: [
{slug: dasherize(decodeURIComponent(request.params.slug))}
]
};
});
}