Commits
- Restore async keyword for functions passed to createAsync
- Use async/await with ternary operator for cleaner code
- Build now succeeds without errors
Co-authored-by: samuele <samuele@zanca.dev>
- Fix TypeScript error where createAsync expected Promise return type
- Wrap null and empty array returns in Promise.resolve()
Co-authored-by: samuele <samuele@zanca.dev>
- Change async functions to use synchronous ternary checks
- Prevent getUser(), getUserGroups(), and getUserActiveLobby() from being called when on /login
- Fixes ERR_TOO_MANY_REDIRECTS for guest users
Co-authored-by: samuele <samuele@zanca.dev>
Co-authored-by: samuele <samuele@zanca.dev>
- Add Discord OAuth env vars (DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, DISCORD_REDIRECT_URI)
- Update Users schema with discordId, displayName, avatarUrl fields
- Create migration 0001_discord_oauth.sql for new columns
- Add Discord OAuth helper library (src/lib/discord.ts)
- Add Discord auth API routes (/api/auth/discord, /api/auth/discord/callback)
- Update server.ts with Discord login/registration logic
- Update login page: Discord as primary, username/password as dev fallback
- Export checkDiscordConfigured query in api/index.ts
Co-authored-by: samuele <samuele@zanca.dev>
- Restore async keyword for functions passed to createAsync
- Use async/await with ternary operator for cleaner code
- Build now succeeds without errors
Co-authored-by: samuele <samuele@zanca.dev>
- Add Discord OAuth env vars (DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, DISCORD_REDIRECT_URI)
- Update Users schema with discordId, displayName, avatarUrl fields
- Create migration 0001_discord_oauth.sql for new columns
- Add Discord OAuth helper library (src/lib/discord.ts)
- Add Discord auth API routes (/api/auth/discord, /api/auth/discord/callback)
- Update server.ts with Discord login/registration logic
- Update login page: Discord as primary, username/password as dev fallback
- Export checkDiscordConfigured query in api/index.ts
Co-authored-by: samuele <samuele@zanca.dev>