diff options
author | 杨宇千 <crupest@outlook.com> | 2019-07-23 17:11:59 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-07-23 17:11:59 +0800 |
commit | 79d4c444ace7cb10fbd638936c2e47a6314d2758 (patch) | |
tree | 8fcf9bdeaccac760dca563b04691bf7f0be07453 /Timeline/Entities/Http/User.cs | |
parent | 6191dbfdfa4f048e2f5a78729b49c8cf8a654ae3 (diff) | |
download | timeline-79d4c444ace7cb10fbd638936c2e47a6314d2758.tar.gz timeline-79d4c444ace7cb10fbd638936c2e47a6314d2758.tar.bz2 timeline-79d4c444ace7cb10fbd638936c2e47a6314d2758.zip |
WIP: Rewrite TokenController.
Diffstat (limited to 'Timeline/Entities/Http/User.cs')
-rw-r--r-- | Timeline/Entities/Http/User.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Timeline/Entities/Http/User.cs b/Timeline/Entities/Http/User.cs index db3d5071..f5d233cd 100644 --- a/Timeline/Entities/Http/User.cs +++ b/Timeline/Entities/Http/User.cs @@ -17,8 +17,8 @@ public const int CreatedCode = 0; public const int ModifiedCode = 1; - public static ReturnCodeMessageResponse Created { get; } = new ReturnCodeMessageResponse(CreatedCode, "A new user is created."); - public static ReturnCodeMessageResponse Modified { get; } = new ReturnCodeMessageResponse(ModifiedCode, "A existing user is modified."); + public static CommonErrorResponse Created { get; } = new CommonErrorResponse(CreatedCode, "A new user is created."); + public static CommonErrorResponse Modified { get; } = new CommonErrorResponse(ModifiedCode, "A existing user is modified."); } public static class UserDeleteResponse @@ -26,8 +26,8 @@ public const int DeletedCode = 0; public const int NotExistsCode = 1; - public static ReturnCodeMessageResponse Deleted { get; } = new ReturnCodeMessageResponse(DeletedCode, "A existing user is deleted."); - public static ReturnCodeMessageResponse NotExists { get; } = new ReturnCodeMessageResponse(NotExistsCode, "User with given name does not exists."); + public static CommonErrorResponse Deleted { get; } = new CommonErrorResponse(DeletedCode, "A existing user is deleted."); + public static CommonErrorResponse NotExists { get; } = new CommonErrorResponse(NotExistsCode, "User with given name does not exists."); } public class ChangePasswordRequest @@ -42,9 +42,9 @@ public const int BadOldPasswordCode = 1; public const int NotExistsCode = 2; - public static ReturnCodeMessageResponse Success { get; } = new ReturnCodeMessageResponse(SuccessCode, "Success to change password."); - public static ReturnCodeMessageResponse BadOldPassword { get; } = new ReturnCodeMessageResponse(BadOldPasswordCode, "Old password is wrong."); - public static ReturnCodeMessageResponse NotExists { get; } = new ReturnCodeMessageResponse(NotExistsCode, "Username does not exists, please update token."); + public static CommonErrorResponse Success { get; } = new CommonErrorResponse(SuccessCode, "Success to change password."); + public static CommonErrorResponse BadOldPassword { get; } = new CommonErrorResponse(BadOldPasswordCode, "Old password is wrong."); + public static CommonErrorResponse NotExists { get; } = new CommonErrorResponse(NotExistsCode, "Username does not exists, please update token."); } public static class PutAvatarResponse @@ -53,8 +53,8 @@ public const int ForbiddenCode = 1; public const int NotExistsCode = 2; - public static ReturnCodeMessageResponse Success { get; } = new ReturnCodeMessageResponse(SuccessCode, "Success to upload avatar."); - public static ReturnCodeMessageResponse Forbidden { get; } = new ReturnCodeMessageResponse(ForbiddenCode, "You are not allowed to upload the user's avatar."); - public static ReturnCodeMessageResponse NotExists { get; } = new ReturnCodeMessageResponse(NotExistsCode, "The username does not exists. If you are a user, try update your token."); + public static CommonErrorResponse Success { get; } = new CommonErrorResponse(SuccessCode, "Success to upload avatar."); + public static CommonErrorResponse Forbidden { get; } = new CommonErrorResponse(ForbiddenCode, "You are not allowed to upload the user's avatar."); + public static CommonErrorResponse NotExists { get; } = new CommonErrorResponse(NotExistsCode, "The username does not exists. If you are a user, try update your token."); } } |