diff --git a/app/src/main/java/com/example/citrusclient/viewmodels/SettingsViewModel.java b/app/src/main/java/com/example/citrusclient/viewmodels/SettingsViewModel.java index 8afc4a4..b7a350e 100644 --- a/app/src/main/java/com/example/citrusclient/viewmodels/SettingsViewModel.java +++ b/app/src/main/java/com/example/citrusclient/viewmodels/SettingsViewModel.java @@ -71,19 +71,20 @@ public void onResponse(Call call, Response response) { if (response.isSuccessful()) { System.out.println("success"); - error_changePw_LiveData.setValue(204); + error_changePw_LiveData.setValue(200); //成功処理 } else { System.out.println("fail"); error_changePw_LiveData.setValue(404); + } } @Override public void onFailure(Call call, Throwable t) { System.out.println("NetWorkError"+t); - error_changePw_LiveData.setValue(404); + error_changePw_LiveData.setValue(401); } }); } @@ -97,10 +98,10 @@ if(response.isSuccessful()){ System.out.println("success"); //成功処理 - error_deleteAccount_LiveData.setValue(204); + error_deleteAccount_LiveData.setValue(200); }else{ System.out.println("fail"); - //もしコンソール表記をするならこの下に処理を記載 + //パスワードが違う error_deleteAccount_LiveData.setValue(404); } } @@ -109,7 +110,7 @@ public void onFailure(Call call, Throwable t) { System.out.println("NetWorkError"+t); //もしコンソール表記をするならこの下に処理を記載 - error_deleteAccount_LiveData.setValue(404); + error_deleteAccount_LiveData.setValue(401); } }); } @@ -123,6 +124,7 @@ public void onResponse(Call call, Response response) { if(response.isSuccessful()){ System.out.println("success"); + accountColorLiveData.setValue(accountColor); }else{ System.out.println("fail"); @@ -145,7 +147,7 @@ public void onResponse(Call call, Response response) { if(response.isSuccessful()){ System.out.println("success"); - error_changeAccount_LiveData.setValue(204); + error_changeAccount_LiveData.setValue(200); }else{ System.out.println("fail"); error_changeAccount_LiveData.setValue(404); @@ -155,7 +157,7 @@ @Override public void onFailure(Call call, Throwable t) { System.out.println("NetWorkError"+t); - error_changeAccount_LiveData.setValue(404); + error_changeAccount_LiveData.setValue(401); } }); }