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 | 1e5ac670386614b2d88da0af198a6b3df004f1dd (patch) | |
tree | 8fcf9bdeaccac760dca563b04691bf7f0be07453 /Timeline/Entities/Http/User.cs | |
parent | d088a03986713a71e274fc16144ca42b7f020e3f (diff) | |
download | timeline-1e5ac670386614b2d88da0af198a6b3df004f1dd.tar.gz timeline-1e5ac670386614b2d88da0af198a6b3df004f1dd.tar.bz2 timeline-1e5ac670386614b2d88da0af198a6b3df004f1dd.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."); } } |