1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01:00

default responses

This commit is contained in:
Puyodead1 2023-03-24 18:28:32 -04:00
parent 6b3a3b750f
commit 0d2a2c7258
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -164,7 +164,6 @@ function apiRoutes() {
let schema = {
$ref: `#/components/schemas/${v.body}`,
};
// if (!v.body) schema = schema.allOf[0];
obj.responses = {
[k]: {
@ -183,8 +182,13 @@ function apiRoutes() {
}),
},
}.merge(obj.responses);
delete obj.responses.default;
}
} else {
obj.responses = {
default: {
description: "No description available",
},
};
}
// handles path parameters