update api documentation

add authentication
This commit is contained in:
Mystikfluu
2023-04-21 00:17:05 +02:00
parent 213368d34c
commit 0ea07f9ec8
16 changed files with 2254 additions and 1136 deletions
+8
View File
@@ -4,6 +4,10 @@ const allowed_settings = {
export const setup = function (router, con, server) {
router.get("/api/settings", function (req, res) {
res.json(res.locals.settings);
/* #swagger.security = [{
"appTokenAuthHeader": []
}] */
});
router.post("/api/settings", function (req, res) {
if (!req.body.setting) {
@@ -45,6 +49,10 @@ export const setup = function (router, con, server) {
}
res.json({ "status": "success" });
});
/* #swagger.security = [{
"appTokenAuthHeader": []
}] */
});
};
export default {