mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Removed unnecessary users.* serializers
refs: https://github.com/TryGhost/Toolbox/issues/245 refs: https://github.com/TryGhost/Ghost/commit/73f91a524 - we don't need these 3 serializers because the default serializer will do the same thing - commit 73f91a524 fixes the logic so that the default serializer is called as a fallback even though the users serializer exists, as there's no matching method name
This commit is contained in:
parent
f096e29922
commit
018ff26f6e
@ -1,34 +1,11 @@
|
|||||||
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:users');
|
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:users');
|
||||||
const tpl = require('@tryghost/tpl');
|
const tpl = require('@tryghost/tpl');
|
||||||
const mappers = require('./mappers');
|
|
||||||
|
|
||||||
const messages = {
|
const messages = {
|
||||||
pwdChangedSuccessfully: 'Password changed successfully.'
|
pwdChangedSuccessfully: 'Password changed successfully.'
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
browse(models, apiConfig, frame) {
|
|
||||||
debug('browse');
|
|
||||||
|
|
||||||
frame.response = {
|
|
||||||
users: models.data.map(model => mappers.users(model, frame)),
|
|
||||||
meta: models.meta
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
read(model, apiConfig, frame) {
|
|
||||||
debug('read');
|
|
||||||
|
|
||||||
frame.response = {
|
|
||||||
users: [mappers.users(model, frame)]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
edit() {
|
|
||||||
debug('edit');
|
|
||||||
this.read(...arguments);
|
|
||||||
},
|
|
||||||
|
|
||||||
destroy(filename, apiConfig, frame) {
|
destroy(filename, apiConfig, frame) {
|
||||||
debug('destroy');
|
debug('destroy');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user