Fix web page exploding for unlinked guilds

Now it should at least show something, though features
like invite won't work correctly. More work needed.
This commit is contained in:
Cadence Ember 2024-12-28 20:01:27 +13:00
commit 0fe02dce22
4 changed files with 90 additions and 6 deletions

View file

@ -96,7 +96,7 @@ as.router.get("/guild", defineEventHandler(async event => {
// Unlinked guild
if (!row) {
const links = getChannelRoomsLinks(guild_id, [])
return pugSync.render(event, "guild.pug", {guild_id, nonce, ...links})
return pugSync.render(event, "guild.pug", {guild, guild_id, nonce, ...links})
}
// Linked guild