1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-23 08:37:28 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Cadence Ember
7237ebf8d4
Decrease self_blocked_status cache to 60 minutes 2022-07-27 10:47:44 +12:00
Cadence Ember
dc0a80d1cb
Add /settings.json API as requested by Edward 2022-07-27 10:41:48 +12:00
2 changed files with 12 additions and 5 deletions

View File

@ -224,12 +224,8 @@ let constants = {
self_blocked_status: {
user_html: {
enabled: true,
time: 2*60*60*1000
time: 60*60*1000
},
timeline_graphql: {
enabled: true,
time: 2*60*60*1000
}
},
db_user_id: true,
db_post_n3: false,

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)