mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
hooks: Call the callback when done
If a hook function neither calls the callback nor returns a (non-undefined) value then there's no way for the hook system to know if/when the hook function has finished.
This commit is contained in:
parent
55939a0d7e
commit
79119baf58
15 changed files with 26 additions and 6 deletions
|
@ -532,7 +532,7 @@ const generateDefinitionForVersion = (version, style = APIPathStyle.FLAT) => {
|
|||
return definition;
|
||||
};
|
||||
|
||||
exports.expressCreateServer = async (_, args) => {
|
||||
exports.expressCreateServer = (hookName, args, cb) => {
|
||||
const { app } = args;
|
||||
|
||||
// create openapi-backend handlers for each api version under /api/{version}/*
|
||||
|
@ -687,6 +687,7 @@ exports.expressCreateServer = async (_, args) => {
|
|||
});
|
||||
}
|
||||
}
|
||||
return cb();
|
||||
};
|
||||
|
||||
// helper to get api root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue