Add get-verify-code endpoint

This commit is contained in:
2026-01-22 14:27:23 -07:00
parent 126a6421d8
commit e2545a0f10
8 changed files with 176 additions and 2 deletions

View File

@@ -4,6 +4,8 @@ import { jsonResponse } from './lib/util'
import dotenv from 'dotenv'
import swagger from '@elysiajs/swagger'
import { handler as getVerifyCodeHandler } from './routes/get-verify-code'
import { handler as canLoadClientHandler } from './routes/can-load-client'
import { handler as launcherVersionsHandler } from './routes/launcher/versions'
@@ -67,6 +69,14 @@ const app = new Elysia({ prefix: '/api' })
})
)
app.post('/get-verify-code', context => getVerifyCodeHandler(context), {
detail: {
hide: true //This endpoint can only be used by the website.
},
body: t.Object({
token: t.String()
})
})
app.get('/can-load-client', context => canLoadClientHandler(context))
app.get('/launcher/versions', context => launcherVersionsHandler(context), {
detail: {