Prevent username retrieval if user is not authenticated and fix variable naming in DiscordAppealMapper.

This commit is contained in:
akastijn 2025-11-23 05:03:42 +01:00
parent d69ef2cd20
commit 1d76895cbb
2 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,7 @@ public interface DiscordAppealMapper {
@Insert("""
INSERT INTO discord_appeals (uuid, discord_id, discord_username, reason, created_at, send_at, e_mail, assigned_to)
VALUES (#{uuid}, #{discord_id}, #{discord_username}, #{reason}, #{createdAt}, #{sendAt}, #{email}, #{assignedTo})
VALUES (#{uuid}, #{discordId}, #{discordUsername}, #{reason}, #{createdAt}, #{sendAt}, #{email}, #{assignedTo})
""")
void createDiscordAppeal(DiscordAppeal discordAppeal);

View File

@ -53,6 +53,9 @@ export class AuthService {
console.log("Reloading username for localhost");
this._username.set('developer');
}
if (!this.isAuthenticated$()) {
return;
}
this.loginService.getUsername().subscribe({
next: (username) => {
console.log("Username retrieved: " + username.username);