mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
at least we are in the dorm now
This commit is contained in:
@@ -58,6 +58,10 @@ const app = new Hono<App>()
|
||||
])
|
||||
})
|
||||
|
||||
// Bulk cached-login lookup by platform id (friends resolution). The client
|
||||
// POSTs repeated `id=` params on the auth host; no DB → no matches → [].
|
||||
.post('/cachedlogin/forplatformids', (c) => c.json([]))
|
||||
|
||||
// OAuth token endpoint — accepts a form-urlencoded body and issues a JWT.
|
||||
.post('/connect/token', async (c) => {
|
||||
// The C# reads `grant_type`, `account_id`, `platform_id` and `platform` from
|
||||
|
||||
@@ -99,6 +99,16 @@ describe('auth worker routes', () => {
|
||||
expect(payload.platform).toBe('Steam')
|
||||
})
|
||||
|
||||
test('POST /cachedlogin/forplatformids returns []', async () => {
|
||||
const res = await exports.default.fetch(`${ORIGIN}/cachedlogin/forplatformids`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
body: 'id=76561197971551621&id=76561197976728738',
|
||||
})
|
||||
expect(res.status).toBe(200)
|
||||
expect(await res.json()).toEqual([])
|
||||
})
|
||||
|
||||
test('GET /role/developer/:id returns ok', async () => {
|
||||
const res = await exports.default.fetch(`${ORIGIN}/role/developer/42`)
|
||||
expect(res.status).toBe(200)
|
||||
|
||||
Reference in New Issue
Block a user