Merge branch 'develop' of github.com:ether/etherpad-lite into mochawesome

This commit is contained in:
John McLear 2021-01-27 20:11:53 +00:00
commit 7696ec0a02
7 changed files with 333 additions and 356 deletions

View file

@ -391,9 +391,9 @@ const defaultResponseRefs = {
// convert to a dictionary of operation objects
const operations = {};
for (const resource in resources) {
for (const action in resources[resource]) {
const {operationId, responseSchema, ...operation} = resources[resource][action];
for (const [resource, actions] of Object.entries(resources)) {
for (const [action, spec] of Object.entries(actions)) {
const {operationId, responseSchema, ...operation} = spec;
// add response objects
const responses = {...defaultResponseRefs};
@ -623,7 +623,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
} else {
// an unknown error happened
// log it and throw internal error
apiLogger.error(err);
apiLogger.error(err.stack || err.toString());
throw new createHTTPError.InternalError('internal error');
}
});