mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated stability index comments around Admin API v2 endpoints
refs 067d2eb614
- v2 API has been in maintenance mode since v3 has been released, updated comments accordingly
This commit is contained in:
parent
067d2eb614
commit
2a4ad0e10f
1 changed files with 4 additions and 5 deletions
|
@ -11,18 +11,17 @@ const notImplemented = function (req, res, next) {
|
|||
}
|
||||
|
||||
// @NOTE: integrations have limited access for now
|
||||
const whitelisted = {
|
||||
// @NOTE: stable
|
||||
// all APIs are considered to be in "maintenance" stability index
|
||||
const allowlisted = {
|
||||
site: ['GET'],
|
||||
posts: ['GET', 'PUT', 'DELETE', 'POST'],
|
||||
pages: ['GET', 'PUT', 'DELETE', 'POST'],
|
||||
images: ['POST'],
|
||||
// @NOTE: experimental
|
||||
webhooks: ['POST', 'PUT', 'DELETE'],
|
||||
tags: ['GET', 'PUT', 'DELETE', 'POST'],
|
||||
users: ['GET'],
|
||||
themes: ['POST', 'PUT'],
|
||||
config: ['GET'],
|
||||
webhooks: ['POST', 'PUT', 'DELETE'],
|
||||
schedules: ['PUT'],
|
||||
db: ['POST']
|
||||
};
|
||||
|
@ -32,7 +31,7 @@ const notImplemented = function (req, res, next) {
|
|||
if (match) {
|
||||
const entity = match[1];
|
||||
|
||||
if (whitelisted[entity] && whitelisted[entity].includes(req.method)) {
|
||||
if (allowlisted[entity] && allowlisted[entity].includes(req.method)) {
|
||||
return next();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue