mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
38e93c19b5
no issue
- was unable to revert 9dd7aff9c6
, because it contains members changes
- functional calls did not work correctly, because the content and admin ctrl differentiation happend in the web layer
- `isContentAPI` returned true for `api.v2.settings.edit(data, {context: {internal:true{})`
- content & admin API are using different controllers
- we can just tell which ctrl is content API and which is not
- the direction fits for the content & admin API split
23 lines
544 B
JavaScript
23 lines
544 B
JavaScript
module.exports = {
|
|
get permissions() {
|
|
return require('./permissions');
|
|
},
|
|
|
|
get serializers() {
|
|
return require('./serializers');
|
|
},
|
|
|
|
get validators() {
|
|
return require('./validators');
|
|
},
|
|
|
|
isContentAPI: (frame) => {
|
|
return frame.apiType === 'content';
|
|
},
|
|
|
|
isAdminAPIKey: (frame) => {
|
|
return frame.options.context && Object.keys(frame.options.context).length !== 0 && frame.options.context.api_key &&
|
|
frame.options.context.api_key.type === 'admin';
|
|
}
|
|
};
|