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

Add instances API

This commit is contained in:
Cadence Fish 2020-01-29 00:38:05 +13:00
parent 6f2d686163
commit 246274a9af
No known key found for this signature in database
GPG Key ID: 81015DF9AA8607E1
2 changed files with 8 additions and 2 deletions

View File

@ -11,7 +11,8 @@ let constants = {
// Things that server owners _could_ change if they want to. // Things that server owners _could_ change if they want to.
caching: { caching: {
image_cache_control: `public, max-age=${7*24*60*60}`, image_cache_control: `public, max-age=${7*24*60*60}`,
resource_cache_time: 30*60*1000 resource_cache_time: 30*60*1000,
instance_list_cache_time: 3*60*1000
}, },
// Instagram uses this stuff. This shouldn't be changed, except to fix a bug that hasn't yet been fixed upstream. // Instagram uses this stuff. This shouldn't be changed, except to fix a bug that hasn't yet been fixed upstream.
@ -23,6 +24,10 @@ let constants = {
shortcode_regex: "[\\w-]+" shortcode_regex: "[\\w-]+"
}, },
resources: {
instances_wiki_raw: "https://raw.githubusercontent.com/wiki/cloudrac3r/bibliogram/Instances.md"
},
// My code uses this stuff. Server owners have no reason to change it. // My code uses this stuff. Server owners have no reason to change it.
symbols: { symbols: {
NO_MORE_PAGES: Symbol("NO_MORE_PAGES"), NO_MORE_PAGES: Symbol("NO_MORE_PAGES"),

View File

@ -70,7 +70,8 @@ module.exports = [
"PAGE_PROFILE", "PAGE_PROFILE",
"PAGE_POST", "PAGE_POST",
"API_STATS", "API_STATS",
"PAGE_HOME" "PAGE_HOME",
"API_INSTANCES"
] ]
} }
} }