mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 15:11:29 -07:00
more routes
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user