diff options
author | crupest <crupest@outlook.com> | 2020-01-29 23:13:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-29 23:13:15 +0800 |
commit | dd0097af5c4ccbe25a1faca2286d729c93fd4116 (patch) | |
tree | c9131a7b95fffd64bf2c26527d7f62fbdefa7e2c /Timeline/Models/Http/UserController.cs | |
parent | 401a0c86054711bf5ebdce7d7717c9b59bffc2fa (diff) | |
download | timeline-dd0097af5c4ccbe25a1faca2286d729c93fd4116.tar.gz timeline-dd0097af5c4ccbe25a1faca2286d729c93fd4116.tar.bz2 timeline-dd0097af5c4ccbe25a1faca2286d729c93fd4116.zip |
...
Diffstat (limited to 'Timeline/Models/Http/UserController.cs')
-rw-r--r-- | Timeline/Models/Http/UserController.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline/Models/Http/UserController.cs b/Timeline/Models/Http/UserController.cs new file mode 100644 index 00000000..229ca1e5 --- /dev/null +++ b/Timeline/Models/Http/UserController.cs @@ -0,0 +1,27 @@ +using System.ComponentModel.DataAnnotations;
+using Timeline.Models.Validation;
+
+namespace Timeline.Models.Http
+{
+ public class UserPatchRequest
+ {
+ [Username]
+ public string? Username { get; set; }
+
+ [MinLength(1)]
+ public string? Password { get; set; }
+
+ [Nickname]
+ public string? Nickname { get; set; }
+
+ public bool? Administrator { get; set; }
+ }
+
+ public class ChangePasswordRequest
+ {
+ [Required(AllowEmptyStrings = false)]
+ public string OldPassword { get; set; } = default!;
+ [Required(AllowEmptyStrings = false)]
+ public string NewPassword { get; set; } = default!;
+ }
+}
|