aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/Http
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-04-30 19:49:27 +0800
committercrupest <crupest@outlook.com>2019-04-30 19:49:27 +0800
commit484f59f9c954fdced635c24c5ab49840c3022d93 (patch)
treef695f1c3d7eb33554784c77dca4afde7f4227503 /Timeline/Entities/Http
parente48e5f8d6e0b675493bceb8e26a957da050d282d (diff)
downloadtimeline-484f59f9c954fdced635c24c5ab49840c3022d93.tar.gz
timeline-484f59f9c954fdced635c24c5ab49840c3022d93.tar.bz2
timeline-484f59f9c954fdced635c24c5ab49840c3022d93.zip
Add avatar upload function.
Diffstat (limited to 'Timeline/Entities/Http')
-rw-r--r--Timeline/Entities/Http/User.cs11
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.");
+ }
}