mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Add admin api feature list to the admin api
This commit is contained in:
@@ -31,6 +31,10 @@ export const createAdminRouter = ({ database, websocket }: {
|
|||||||
}) => {
|
}) => {
|
||||||
const router = Router()
|
const router = Router()
|
||||||
|
|
||||||
|
router.get('/', (_, res) => {
|
||||||
|
res.send('<html><body><a href="/admin/status">status</a><br><a href="/admin/status-message">Status message</a><br><a href="/admin/unlock-premium">unlock premium</a></body></html>')
|
||||||
|
})
|
||||||
|
|
||||||
router.get('/status', (_, res) => {
|
router.get('/status', (_, res) => {
|
||||||
res.json({
|
res.json({
|
||||||
websocketClients: websocket.countConnections()
|
websocketClients: websocket.countConnections()
|
||||||
|
|||||||
Reference in New Issue
Block a user