diff options
author | crupest <crupest@outlook.com> | 2019-04-30 19:49:27 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-30 19:49:27 +0800 |
commit | 2c9ee904731d3c931607ba99f1bab21fcb1e1bb4 (patch) | |
tree | f695f1c3d7eb33554784c77dca4afde7f4227503 /Timeline/Entities/Http/User.cs | |
parent | a35090ab44a51f22a5e2fda95310738bdfee698d (diff) | |
download | timeline-2c9ee904731d3c931607ba99f1bab21fcb1e1bb4.tar.gz timeline-2c9ee904731d3c931607ba99f1bab21fcb1e1bb4.tar.bz2 timeline-2c9ee904731d3c931607ba99f1bab21fcb1e1bb4.zip |
Add avatar upload function.
Diffstat (limited to 'Timeline/Entities/Http/User.cs')
-rw-r--r-- | Timeline/Entities/Http/User.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Timeline/Entities/Http/User.cs b/Timeline/Entities/Http/User.cs index d42ca088..31cafaa3 100644 --- a/Timeline/Entities/Http/User.cs +++ b/Timeline/Entities/Http/User.cs @@ -40,4 +40,15 @@ 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."); + } } |