Add DiscordAppealMapper to initialization and simplify username reload logic in auth service.

This commit is contained in:
akastijn 2025-11-23 04:44:26 +01:00
parent 2baa3ef51f
commit b15386d157
2 changed files with 3 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import com.alttd.altitudeweb.database.web_db.KeyPairMapper;
import com.alttd.altitudeweb.database.web_db.PrivilegedUserMapper;
import com.alttd.altitudeweb.database.web_db.SettingsMapper;
import com.alttd.altitudeweb.database.web_db.forms.AppealMapper;
import com.alttd.altitudeweb.database.web_db.forms.DiscordAppealMapper;
import com.alttd.altitudeweb.database.web_db.forms.StaffApplicationMapper;
import com.alttd.altitudeweb.database.web_db.mail.EmailVerificationMapper;
import lombok.extern.slf4j.Slf4j;
@ -24,6 +25,7 @@ public class InitializeWebDb {
configuration.addMapper(KeyPairMapper.class);
configuration.addMapper(PrivilegedUserMapper.class);
configuration.addMapper(AppealMapper.class);
configuration.addMapper(DiscordAppealMapper.class);
configuration.addMapper(StaffApplicationMapper.class);
configuration.addMapper(EmailVerificationMapper.class);
}).join()

View File

@ -87,9 +87,7 @@ export class AuthService {
const claims = this.extractJwtClaims(jwt);
this.userClaimsSubject.set(claims);
this.isAuthenticatedSubject.set(true);
if (this.username() == null) {
this.reloadUsername();
}
this.reloadUsername();
return true;
} catch (e) {
this.logout();