revert back to success/error envelope

This commit is contained in:
Devin Zuczek
2026-07-13 23:29:04 -04:00
parent 6845c9fd34
commit 229b00ada8
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -27,6 +27,6 @@ export const moderationRoutes = new Hono<App>({ strict: false })
// The client reporting its device id (form-encoded `oldDeviceId`, `newDeviceId`,
// `platform`), rotating from the id it thinks we hold to the current one. Carries no
// bearer token and fires before account creation, so there is no caller to attribute
// the id to and nothing to store it against — we accept it and drop it. The client
// ignores the response body; the real service answers with an empty array.
.post('/api/PlayerReporting/v1/deviceId', (c) => c.json([]))
// the id to and nothing to store it against — we accept it and drop it. The real
// service answers with a `{ success, error }` envelope.
.post('/api/PlayerReporting/v1/deviceId', (c) => c.json({ success: true, error: '' }))
+1 -1
View File
@@ -235,7 +235,7 @@ describe('public endpoints', () => {
}),
})
expect(res.status).toBe(200)
expect(await res.json()).toEqual([])
expect(await res.json()).toEqual({ success: true, error: '' })
})
test('POST /api/playerReputation/v2/bulk returns a reputation per id', async () => {