mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-10 07:31:27 -07:00
more routes
This commit is contained in:
@@ -142,6 +142,16 @@ export async function getRoomsByCreator(db: D1Database, accountId: number): Prom
|
||||
return parseAll(results)
|
||||
}
|
||||
|
||||
/**
|
||||
* An account's public, non-dorm rooms — the publicly viewable "rooms owned by
|
||||
* <player>" list (excludes private rooms, dorms, and list-excluded rooms).
|
||||
*/
|
||||
export async function getPublicRoomsByCreator(db: D1Database, accountId: number): Promise<Room[]> {
|
||||
return (await getRoomsByCreator(db, accountId)).filter(
|
||||
(r) => r.IsDorm !== true && r.Accessibility === 1 && r.ExcludeFromLists !== true
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Rooms the player has favorited (interaction.favorited = 1), most recently
|
||||
* interacted first. Joins the `interaction` table to `rooms`, so a favorited room
|
||||
|
||||
Reference in New Issue
Block a user