fix featured

This commit is contained in:
Devin Zuczek
2026-07-08 09:53:33 -04:00
parent a029d0ed67
commit 1bb8389bcc
3 changed files with 81 additions and 0 deletions
+8
View File
@@ -10,6 +10,7 @@ import {
findSubRoom,
getBaseRooms,
getFavoritedRooms,
getFeaturedRooms,
getHotRooms,
getInteraction,
getPublicRoomsByCreator,
@@ -292,6 +293,13 @@ const app = new Hono<App>()
return c.json(await getRecommendedRooms(c.env.DB, skip, take))
})
// Featured rooms — a single always-active group whose `Rooms` are a randomly
// ordered set of public, non-dorm rooms. No real curation yet, so `current`
// just returns a shuffled list of eligible rooms in the featured-group shape.
.get('/featuredrooms/current', async (c) => {
return c.json(await getFeaturedRooms(c.env.DB))
})
// Bulk room lookup by `id` or `name` — returns an array of matched rooms (the
// client calls this bare on the rooms host). Rooms not in D1 are simply absent
// from the result; the client treats an empty result as NoSuchRoom.