mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
24 lines
535 B
JavaScript
24 lines
535 B
JavaScript
|
import Ember from 'ember';
|
||
|
|
||
|
const {
|
||
|
String: {dasherize}
|
||
|
} = Ember;
|
||
|
|
||
|
export default function mockSlugs(server) {
|
||
|
server.get('/slugs/post/:slug/', function (db, request) {
|
||
|
return {
|
||
|
slugs: [
|
||
|
{slug: dasherize(decodeURIComponent(request.params.slug))}
|
||
|
]
|
||
|
};
|
||
|
});
|
||
|
|
||
|
server.get('/slugs/user/:slug/', function (db, request) {
|
||
|
return {
|
||
|
slugs: [
|
||
|
{slug: dasherize(decodeURIComponent(request.params.slug))}
|
||
|
]
|
||
|
};
|
||
|
});
|
||
|
}
|