Added "mediaAPI" labs flag

refs https://github.com/TryGhost/Toolbox/issues/95

- A flag go control the Media API alpha feature
This commit is contained in:
Naz 2021-11-04 10:48:53 +04:00
parent 091240db48
commit 2dac3d489f
2 changed files with 2 additions and 0 deletions

View File

@ -238,6 +238,7 @@ module.exports = function apiRoutes() {
// ## media
router.post('/media/upload',
labs.enabledMiddleware('mediaAPI'),
mw.authAdminApi,
apiMw.upload.media('file', 'thumbnail'),
apiMw.upload.mediaValidation({type: 'media'}),

View File

@ -29,6 +29,7 @@ const ALPHA_FEATURES = [
'oauthLogin',
'membersActivity',
'cardSettingsPanel',
'mediaAPI',
'membersAutoLogin'
];