aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-12 23:21:31 +0800
committercrupest <crupest@outlook.com>2020-11-12 23:21:31 +0800
commitd3da412fa7e10db8c721846152a2c056dd4ccbcf (patch)
tree4cd665209dc63fb8f9c658e9562481e32f7d3986 /BackEnd/Timeline/Models/Http
parentee1b2b5b100268aa510257a1a2cd4cd03f9fc72b (diff)
downloadtimeline-d3da412fa7e10db8c721846152a2c056dd4ccbcf.tar.gz
timeline-d3da412fa7e10db8c721846152a2c056dd4ccbcf.tar.bz2
timeline-d3da412fa7e10db8c721846152a2c056dd4ccbcf.zip
...
Diffstat (limited to 'BackEnd/Timeline/Models/Http')
-rw-r--r--BackEnd/Timeline/Models/Http/UserController.cs21
1 files changed, 2 insertions, 19 deletions
diff --git a/BackEnd/Timeline/Models/Http/UserController.cs b/BackEnd/Timeline/Models/Http/UserController.cs
index 6bc5a66e..92a63874 100644
--- a/BackEnd/Timeline/Models/Http/UserController.cs
+++ b/BackEnd/Timeline/Models/Http/UserController.cs
@@ -2,6 +2,7 @@ using AutoMapper;
using System.ComponentModel.DataAnnotations;
using Timeline.Controllers;
using Timeline.Models.Validation;
+using Timeline.Services;
namespace Timeline.Models.Http
{
@@ -27,11 +28,6 @@ namespace Timeline.Models.Http
/// </summary>
[Nickname]
public string? Nickname { get; set; }
-
- /// <summary>
- /// Whether to be administrator. Null if not change. Need to be administrator.
- /// </summary>
- public bool? Administrator { get; set; }
}
/// <summary>
@@ -50,18 +46,6 @@ namespace Timeline.Models.Http
/// </summary>
[Required, MinLength(1)]
public string Password { get; set; } = default!;
-
- /// <summary>
- /// Whether the new user is administrator.
- /// </summary>
- [Required]
- public bool? Administrator { get; set; }
-
- /// <summary>
- /// Nickname of the new user.
- /// </summary>
- [Nickname]
- public string? Nickname { get; set; }
}
/// <summary>
@@ -86,8 +70,7 @@ namespace Timeline.Models.Http
{
public UserControllerAutoMapperProfile()
{
- CreateMap<UserPatchRequest, User>(MemberList.Source);
- CreateMap<CreateUserRequest, User>(MemberList.Source);
+ CreateMap<UserPatchRequest, ModifyUserParams>();
}
}
}