add playerevents endpoint, whatever that is

This commit is contained in:
Devin Zuczek
2026-07-23 14:28:32 -04:00
parent 2f6a40279d
commit 725540a95b
2 changed files with 22 additions and 0 deletions
+14
View File
@@ -194,6 +194,20 @@ export const gameplayRoutes = new Hono<App>({ strict: false })
}),
(c) => c.json({ ContinuationToken: '', Events: [] })
)
// Live player-event search (the "happening now" browse query). No player-event
// storage yet, so there's nothing live to return — a bare empty array.
.get(
'/api/playerevents/v1/searchlive',
describeRoute({
tags: ['Gameplay'],
summary: 'Search live player events',
description:
'The "happening now" search on the player-events browse screen. No player-event ' +
'storage yet, so there are no live events — returns an empty list.',
responses: { 200: json(JsonArray, 'An empty list') },
}),
(c) => c.json([])
)
.get(
'/api/announcement/v1/get',
describeRoute({
@@ -219,6 +219,13 @@ describe('public endpoints', () => {
expect(await one.json()).toEqual({ ContinuationToken: '', Events: [] })
})
test('GET /api/playerevents/v1/searchlive returns an empty list', async () => {
// No player-event storage yet → nothing live to return.
const res = await exports.default.fetch(`${ORIGIN}/api/playerevents/v1/searchlive`)
expect(res.status).toBe(200)
expect(await res.json()).toEqual([])
})
test('GET /api/PlayerReporting/v1/moderationBlockDetails reports "not blocked"', async () => {
const res = await exports.default.fetch(
`${ORIGIN}/api/PlayerReporting/v1/moderationBlockDetails`
@@ -1931,6 +1938,7 @@ describe('openapi', () => {
'GET /api/playerevents/v1/all',
'GET /api/playerevents/v1/club/{clubId}',
'GET /api/playerevents/v1/clubs',
'GET /api/playerevents/v1/searchlive',
'GET /api/playerevents/v1/tagfilters',
'GET /api/players/v1/progression/{id}',
'GET /api/players/v2/progression/bulk',