aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/Http/User.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-05-16 21:57:56 +0800
committercrupest <crupest@outlook.com>2019-05-16 21:57:56 +0800
commit3de4179449a209646e0e5a967d270f7fa0878c03 (patch)
treea71563526342e8cc4a2c99227fcd178ea6d1fbde /Timeline/Entities/Http/User.cs
parent461a37e3f2058d98c69cf598c1cd34a1d405a11e (diff)
downloadtimeline-3de4179449a209646e0e5a967d270f7fa0878c03.tar.gz
timeline-3de4179449a209646e0e5a967d270f7fa0878c03.tar.bz2
timeline-3de4179449a209646e0e5a967d270f7fa0878c03.zip
Change roles in UserInfo into isadmin.
Diffstat (limited to 'Timeline/Entities/Http/User.cs')
-rw-r--r--Timeline/Entities/Http/User.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/Timeline/Entities/Http/User.cs b/Timeline/Entities/Http/User.cs
index 31cafaa3..db3d5071 100644
--- a/Timeline/Entities/Http/User.cs
+++ b/Timeline/Entities/Http/User.cs
@@ -1,9 +1,15 @@
namespace Timeline.Entities.Http
{
- public class UserModifyRequest
+ public class UserPutRequest
{
public string Password { get; set; }
- public string[] Roles { get; set; }
+ public bool IsAdmin { get; set; }
+ }
+
+ public class UserPatchRequest
+ {
+ public string Password { get; set; }
+ public bool? IsAdmin { get; set; }
}
public static class UserPutResponse
@@ -47,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 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.");
}
}