[rooms] add showcase stub

This commit is contained in:
Devin Zuczek
2026-09-08 23:52:36 -04:00
parent 222547ee13
commit 9a8fc1cab5
3 changed files with 50 additions and 0 deletions
+24
View File
@@ -123,6 +123,7 @@ import {
SaveSubRoomDataRequest,
SearchSuggestions,
ServiceStatus,
ShowcasedRooms,
stringQuery,
SubRoomAccessibilityRequest,
SubRoomDataSaveResponseDto,
@@ -1282,6 +1283,29 @@ const app = new Hono<App>()
c.json(await getPublicRoomsByCreator(c.env.DB, Number.parseInt(c.req.param('accountId'), 10)))
)
// A player's showcased rooms — the hand-picked rail the client draws on a profile,
// separate from `ownedby/{accountId}` (which is everything public they own). Stub →
// empty list: nothing stores a showcase yet, and an empty rail is what a player who
// has picked nothing looks like, where a 404 leaves the profile half-drawn. No auth,
// matching the profile list it sits beside — a showcase is public by definition.
.get(
'/showcase/:playerId{[0-9]+}',
describeRoute({
tags: ['Rooms'],
summary: 'A player’s showcased rooms',
description: [
'The rooms a player has showcased on their profile, as a bare array. Nothing stores a',
'showcase yet, so this is a stub serving an empty list — which the client reads as',
'“nothing showcased”, the same as a player who has picked none. Unlike',
'`ownedby/{accountId}`, which lists everything public the account owns, a showcase is',
'a chosen subset. No auth: a profile is public.',
].join(' '),
parameters: [playerIdParam],
responses: { 200: json(ShowcasedRooms, 'An empty list') },
}),
(c) => c.json([])
)
// Rooms the caller has favorited (from the interaction table). Auth-gated.
// Paginated via skip/take (take defaults to 100). Returns a bare array, like the
// other room-source `*by/me` lists the client loads.