mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
add playerevents endpoint, whatever that is
This commit is contained in:
@@ -194,6 +194,20 @@ export const gameplayRoutes = new Hono<App>({ strict: false })
|
|||||||
}),
|
}),
|
||||||
(c) => c.json({ ContinuationToken: '', Events: [] })
|
(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(
|
.get(
|
||||||
'/api/announcement/v1/get',
|
'/api/announcement/v1/get',
|
||||||
describeRoute({
|
describeRoute({
|
||||||
|
|||||||
@@ -219,6 +219,13 @@ describe('public endpoints', () => {
|
|||||||
expect(await one.json()).toEqual({ ContinuationToken: '', Events: [] })
|
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 () => {
|
test('GET /api/PlayerReporting/v1/moderationBlockDetails reports "not blocked"', async () => {
|
||||||
const res = await exports.default.fetch(
|
const res = await exports.default.fetch(
|
||||||
`${ORIGIN}/api/PlayerReporting/v1/moderationBlockDetails`
|
`${ORIGIN}/api/PlayerReporting/v1/moderationBlockDetails`
|
||||||
@@ -1931,6 +1938,7 @@ describe('openapi', () => {
|
|||||||
'GET /api/playerevents/v1/all',
|
'GET /api/playerevents/v1/all',
|
||||||
'GET /api/playerevents/v1/club/{clubId}',
|
'GET /api/playerevents/v1/club/{clubId}',
|
||||||
'GET /api/playerevents/v1/clubs',
|
'GET /api/playerevents/v1/clubs',
|
||||||
|
'GET /api/playerevents/v1/searchlive',
|
||||||
'GET /api/playerevents/v1/tagfilters',
|
'GET /api/playerevents/v1/tagfilters',
|
||||||
'GET /api/players/v1/progression/{id}',
|
'GET /api/players/v1/progression/{id}',
|
||||||
'GET /api/players/v2/progression/bulk',
|
'GET /api/players/v2/progression/bulk',
|
||||||
|
|||||||
Reference in New Issue
Block a user