aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/Http/User.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-07-27 21:47:14 +0800
committerGitHub <noreply@github.com>2019-07-27 21:47:14 +0800
commit590a8c576f17817539505ef2ca50f52e840a61d2 (patch)
tree572a2ae5c65c484718b3bfda68fd8babc56fe6f2 /Timeline/Entities/Http/User.cs
parent3de4179449a209646e0e5a967d270f7fa0878c03 (diff)
parent58985e8f2a6931029974067b2c1e78963e4508f0 (diff)
downloadtimeline-590a8c576f17817539505ef2ca50f52e840a61d2.tar.gz
timeline-590a8c576f17817539505ef2ca50f52e840a61d2.tar.bz2
timeline-590a8c576f17817539505ef2ca50f52e840a61d2.zip
Merge pull request #25 from crupest/auth
Refactor a lot, especially authentication.
Diffstat (limited to 'Timeline/Entities/Http/User.cs')
-rw-r--r--Timeline/Entities/Http/User.cs40
1 files changed, 0 insertions, 40 deletions
diff --git a/Timeline/Entities/Http/User.cs b/Timeline/Entities/Http/User.cs
index db3d5071..91423c7b 100644
--- a/Timeline/Entities/Http/User.cs
+++ b/Timeline/Entities/Http/User.cs
@@ -12,49 +12,9 @@
public bool? IsAdmin { get; set; }
}
- public static class UserPutResponse
- {
- 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 class UserDeleteResponse
- {
- 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 class ChangePasswordRequest
{
public string OldPassword { get; set; }
public string NewPassword { get; set; }
}
-
- public static class ChangePasswordResponse
- {
- public const int SuccessCode = 0;
- 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 class PutAvatarResponse
- {
- public const int SuccessCode = 0;
- 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.");
- }
}