mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-16 05:07:29 +00:00
Add /settings.json API as requested by Edward
This commit is contained in:
parent
a9c7923b2c
commit
dc0a80d1cb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user