mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
add more endpoints
This commit is contained in:
+12
-2
@@ -71,9 +71,19 @@ const app = new Hono<App>({ strict: false })
|
||||
.notFound(withNotFound())
|
||||
|
||||
// ---- Config / version ----------------------------------------------------
|
||||
.get('/api/config/v1/amplitude', (c) => c.json({ AmplitudeKey: 'NoKeyProvided' }))
|
||||
.get('/api/config/v1/amplitude', (c) => c.json({
|
||||
AmplitudeKey: "a",
|
||||
StatSigKey: "a",
|
||||
RudderStackKey: "a",
|
||||
UseRudderStack: false
|
||||
}))
|
||||
.get('/api/config/v2', (c) => c.json(apiConfigV2))
|
||||
.get('/api/versioncheck/v4', (c) => c.json({ VersionStatus: 0 }))
|
||||
.get('/api/versioncheck/v4', (c) => c.json({
|
||||
"VersionStatus": 0,
|
||||
"UpdateNotificationStage": 0,
|
||||
"IsVersionIslanded": false,
|
||||
"IsCrossPlayDisabled": false,
|
||||
}))
|
||||
.get('/api/gameconfigs/v1/all', (c) => c.json(gameConfigsV1All))
|
||||
|
||||
// ---- Social ---------------------------------------------------------------
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('public endpoints', () => {
|
||||
|
||||
test('GET /api/versioncheck/v4', async () => {
|
||||
const res = await exports.default.fetch(`${ORIGIN}/api/versioncheck/v4`)
|
||||
expect(await res.json()).toEqual({ VersionStatus: 0 })
|
||||
expect(await res.json()).toMatchObject({ VersionStatus: 0 })
|
||||
})
|
||||
|
||||
test('GET /api/relationships/v2/get returns empty array', async () => {
|
||||
|
||||
Reference in New Issue
Block a user