アカウント削除するコードを一番最後にずらしました. #219

Merged t-watanabe merged 1 commit into nitta-lab-2024:master from nitta-lab-2024:AccountRest on 6 Jun
Showing 1 changed file
View
2
■■■
src/main/java/org/ntlab/citrusserver/resources/AccountsRest.java
public void deleteAccount(@PathParam("account_id") String accountId,
@QueryParam("token") String token,
@QueryParam("password")String password) {
if(accountManager.checkToken(accountId, token)) {
accountManager.deleteAccount(accountId, token, password);
bookManager.deleteAllBooks(accountId);
todoManager.deleteAllTodosByAccountId(accountId);
scheduleManager.deleteSchedules(accountId);
favoriteManager.removeFavoriteById(accountId);
accountManager.deleteAccount(accountId, token, password);
return;
}
//404
if (!accountManager.getAccountsID().contains(accountId)){ //account_idが存在しない時