more routes

This commit is contained in:
Devin Zuczek
2026-07-01 01:03:39 -04:00
parent ba33003343
commit f35e803267
12 changed files with 242 additions and 9 deletions
+7
View File
@@ -10,6 +10,7 @@ import {
getFavoritedRooms,
getHotRooms,
getInteraction,
getPublicRoomsByCreator,
getRoomById,
getRoomByName,
getRoomsByCreator,
@@ -206,6 +207,12 @@ const app = new Hono<App>()
.get('/rooms/ownedby/me', ownedRooms)
.get('/rooms/createdby/me', ownedRooms)
// Public: the rooms a given account owns that are publicly viewable. No auth —
// returns a bare array (empty when the account owns no public rooms).
.get('/rooms/ownedby/:accountId{[0-9]+}', async (c) =>
c.json(await getPublicRoomsByCreator(c.env.DB, Number.parseInt(c.req.param('accountId'), 10)))
)
// 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.