diff --git a/apps/api/src/routes/moderation.ts b/apps/api/src/routes/moderation.ts index cdf7eef..1ccae5c 100644 --- a/apps/api/src/routes/moderation.ts +++ b/apps/api/src/routes/moderation.ts @@ -27,6 +27,6 @@ export const moderationRoutes = new Hono({ 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: '' })) diff --git a/apps/api/src/test/integration/api.test.ts b/apps/api/src/test/integration/api.test.ts index c9659ca..e8d67e6 100644 --- a/apps/api/src/test/integration/api.test.ts +++ b/apps/api/src/test/integration/api.test.ts @@ -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 () => {