Add /settings.json API as requested by Edward

This commit is contained in:
Cadence Ember 2022-07-27 10:41:48 +12:00
parent a9c7923b2c
commit dc0a80d1cb
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
1 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,17 @@ const crypto = require("crypto")
const db = require("../../lib/db")
module.exports = [
{
route: "/settings.json", methods: ["GET"], code: async ({req, url}) => {
const token = getToken(req)
const settings = getSettings(req)
return {
statusCode: 200,
contentType: "application/json",
content: settings
}
}
},
{
route: "/settings", methods: ["GET"], code: async ({req, url}) => {
const token = getToken(req)