Improve staff application flow with error handling updates, new email address, and code formatting adjustments.
This commit is contained in:
parent
311d77fcb2
commit
01dab905d4
|
|
@ -65,8 +65,12 @@ public class ApplicationController implements ApplicationsApi {
|
||||||
log.error("Failed to send staff application {} to Discord", application.id(), e);
|
log.error("Failed to send staff application {} to Discord", application.id(), e);
|
||||||
return ResponseEntity.internalServerError().build();
|
return ResponseEntity.internalServerError().build();
|
||||||
}
|
}
|
||||||
markAsSent(application.id());
|
try {
|
||||||
|
markAsSent(application.id());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Failed to mark application {} as sent", application.id(), e);
|
||||||
|
return ResponseEntity.internalServerError().build();
|
||||||
|
}
|
||||||
FormResponseDto response = buildResponse(application);
|
FormResponseDto response = buildResponse(application);
|
||||||
return ResponseEntity.status(200).body(response);
|
return ResponseEntity.status(200).body(response);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class StaffApplicationMail {
|
||||||
@Value("${spring.mail.username}")
|
@Value("${spring.mail.username}")
|
||||||
private String fromEmail;
|
private String fromEmail;
|
||||||
|
|
||||||
private static final String STAFF_APPLICATION_EMAIL = "staff@alttd.com";
|
private static final String STAFF_APPLICATION_EMAIL = "apply@alttd.com";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an email with the staff application details to the staff applications team mailbox.
|
* Sends an email with the staff application details to the staff applications team mailbox.
|
||||||
|
|
|
||||||
|
|
@ -20,22 +20,22 @@ public class InitializeWebDb {
|
||||||
protected static void init() {
|
protected static void init() {
|
||||||
log.info("Initializing WebDb");
|
log.info("Initializing WebDb");
|
||||||
Connection.getConnection(Databases.DEFAULT, (configuration) -> {
|
Connection.getConnection(Databases.DEFAULT, (configuration) -> {
|
||||||
configuration.addMapper(SettingsMapper.class);
|
configuration.addMapper(SettingsMapper.class);
|
||||||
configuration.addMapper(KeyPairMapper.class);
|
configuration.addMapper(KeyPairMapper.class);
|
||||||
configuration.addMapper(PrivilegedUserMapper.class);
|
configuration.addMapper(PrivilegedUserMapper.class);
|
||||||
configuration.addMapper(AppealMapper.class);
|
configuration.addMapper(AppealMapper.class);
|
||||||
configuration.addMapper(StaffApplicationMapper.class);
|
configuration.addMapper(StaffApplicationMapper.class);
|
||||||
configuration.addMapper(EmailVerificationMapper.class);
|
configuration.addMapper(EmailVerificationMapper.class);
|
||||||
}).join()
|
}).join()
|
||||||
.runQuery(sqlSession -> {
|
.runQuery(sqlSession -> {
|
||||||
createSettingsTable(sqlSession);
|
createSettingsTable(sqlSession);
|
||||||
createKeyTable(sqlSession);
|
createKeyTable(sqlSession);
|
||||||
createPrivilegedUsersTable(sqlSession);
|
createPrivilegedUsersTable(sqlSession);
|
||||||
createPrivilegesTable(sqlSession);
|
createPrivilegesTable(sqlSession);
|
||||||
createAppealTable(sqlSession);
|
createAppealTable(sqlSession);
|
||||||
createStaffApplicationsTable(sqlSession);
|
createStaffApplicationsTable(sqlSession);
|
||||||
createUserEmailsTable(sqlSession);
|
createUserEmailsTable(sqlSession);
|
||||||
});
|
});
|
||||||
log.debug("Initialized WebDb");
|
log.debug("Initialized WebDb");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user