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
+10
View File
@@ -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