From 018ff26f6ee0a6ae986a0dd364251074e12c8e3c Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 29 Mar 2022 14:45:36 +0100 Subject: [PATCH] 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 --- .../canary/utils/serializers/output/users.js | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/core/server/api/canary/utils/serializers/output/users.js b/core/server/api/canary/utils/serializers/output/users.js index 21b1c8c5c6..3376e2c0fd 100644 --- a/core/server/api/canary/utils/serializers/output/users.js +++ b/core/server/api/canary/utils/serializers/output/users.js @@ -1,34 +1,11 @@ const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:users'); const tpl = require('@tryghost/tpl'); -const mappers = require('./mappers'); const messages = { pwdChangedSuccessfully: 'Password changed successfully.' }; 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) { debug('destroy');