From 1cc38733ba6df8b8340420cff8fc7b643704c6ae Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 2 Mar 2022 16:33:47 +0700 Subject: [PATCH] Added Media and Files APIs to API key allowlist refs https://github.com/TryGhost/Toolbox/issues/219 - These two APIs similarly to Images API should be accessible by the Admin-API SDK. Opens up a way to write custom scripts uploading files and media --- core/server/web/api/canary/admin/middleware.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/server/web/api/canary/admin/middleware.js b/core/server/web/api/canary/admin/middleware.js index 2fb250e3a7..f24842a660 100644 --- a/core/server/web/api/canary/admin/middleware.js +++ b/core/server/web/api/canary/admin/middleware.js @@ -31,6 +31,8 @@ const notImplemented = function (req, res, next) { members: ['GET', 'PUT', 'DELETE', 'POST'], config: ['GET'], schedules: ['PUT'], + files: ['POST'], + media: ['POST'], db: ['POST'] };