From 6ba6e9c3077a35237fd1bccd801936433775ea50 Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 23 Nov 2020 11:34:14 +1300 Subject: [PATCH] Removed unused authors input serializer refs https://github.com/TryGhost/Ghost/issues/10354 - The serializer wasn't hooked up properly during the implementation (https://github.com/TryGhost/Ghost/commit/1a4497fc9abf4a23f83f6fe10bac3b790526d020). It is not possible to hook it back in now as that would introduce breaking change to now stable v2 API. - v3 (canary) has is properly hooked in, so there should not be a problem going forward --- .../api/v2/utils/serializers/input/authors.js | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 core/server/api/v2/utils/serializers/input/authors.js diff --git a/core/server/api/v2/utils/serializers/input/authors.js b/core/server/api/v2/utils/serializers/input/authors.js deleted file mode 100644 index 46dd2e16dd..0000000000 --- a/core/server/api/v2/utils/serializers/input/authors.js +++ /dev/null @@ -1,26 +0,0 @@ -const debug = require('ghost-ignition').debug('api:v2:utils:serializers:input:authors'); -const utils = require('../../index'); - -function setDefaultOrder(frame) { - if (!frame.options.order) { - frame.options.order = 'name asc'; - } -} - -module.exports = { - browse(apiConfig, frame) { - debug('browse'); - - if (utils.isContentAPI(frame)) { - setDefaultOrder(frame); - } - }, - - read(apiConfig, frame) { - debug('read'); - - if (utils.isContentAPI(frame)) { - setDefaultOrder(frame); - } - } -};