mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Excluded docName
key from API controller method map
- due to the structure of our API controllers, the docName and methods are under the same structure - this code loops over the keys of the controller and forms the method map - however, it currently also loops over every character of the docName, so the resulting map contains a weird structure of chars - we don't need the docName for this, so we can just exclude it from the keys - this doesn't change any functionality
This commit is contained in:
parent
d82b136a6a
commit
00f42855e3
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ const pipeline = (apiController, apiUtils, apiType) => {
|
|||
return controllerMap.get(apiController);
|
||||
}
|
||||
|
||||
const keys = Object.keys(apiController);
|
||||
const keys = Object.keys(apiController).filter(key => key !== 'docName');
|
||||
const docName = apiController.docName;
|
||||
|
||||
// CASE: api controllers are objects with configuration.
|
||||
|
|
Loading…
Add table
Reference in a new issue