调整细节

This commit is contained in:
2024-09-15 18:26:08 +08:00
parent 4b28a882a9
commit 6cf8e740dd
23 changed files with 341 additions and 156 deletions

View File

@@ -460,11 +460,17 @@ class AccountServiceImpl : AccountService {
}
override suspend fun resetPassword(email: String) {
ApiClient.api.resetPassword(
val resp = ApiClient.api.resetPassword(
ResetPasswordRequestBody(
username = email
)
)
if (!resp.isSuccessful) {
parseErrorResponse(resp.errorBody())?.let {
throw it.toServiceException()
}
throw ServiceException("Failed to reset password")
}
}
}