mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Show instance state on homepage
This commit is contained in:
parent
3108c68fd5
commit
4426c2f206
5 changed files with 24 additions and 3 deletions
|
|
@ -1,9 +1,17 @@
|
|||
const constants = require("../../lib/constants")
|
||||
const {fetchUser, getOrFetchShortcode, requestCache} = require("../../lib/collectors")
|
||||
const {fetchUser, getOrFetchShortcode, requestCache, history} = require("../../lib/collectors")
|
||||
const {render, redirect} = require("pinski/plugins")
|
||||
const {pugCache} = require("../passthrough")
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
route: "/", methods: ["GET"], code: async () => {
|
||||
return render(200, "pug/home.pug", {
|
||||
rssEnabled: constants.settings.rss_enabled,
|
||||
allUnblocked: history.testNoneBlocked()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
route: `/u`, methods: ["GET"], code: async ({url}) => {
|
||||
if (url.searchParams.has("u")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue