aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Http/User.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-17 19:56:42 +0800
committer杨宇千 <crupest@outlook.com>2019-08-17 19:56:42 +0800
commit3bd772a17276a7f6f50cead2b7fbd31975f660b9 (patch)
tree8293d34813cbab69935f05f214db94f3b0d04777 /Timeline/Models/Http/User.cs
parent3366557cf15417097d2293a8ff8855e4f4fc0608 (diff)
downloadtimeline-3bd772a17276a7f6f50cead2b7fbd31975f660b9.tar.gz
timeline-3bd772a17276a7f6f50cead2b7fbd31975f660b9.tar.bz2
timeline-3bd772a17276a7f6f50cead2b7fbd31975f660b9.zip
Add change username.
Diffstat (limited to 'Timeline/Models/Http/User.cs')
-rw-r--r--Timeline/Models/Http/User.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Timeline/Models/Http/User.cs b/Timeline/Models/Http/User.cs
index d45543fb..4308a19c 100644
--- a/Timeline/Models/Http/User.cs
+++ b/Timeline/Models/Http/User.cs
@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
+using Timeline.Models.Validation;
namespace Timeline.Models.Http
{
@@ -16,6 +17,15 @@ namespace Timeline.Models.Http
public bool? Administrator { get; set; }
}
+ public class ChangeUsernameRequest
+ {
+ [Required]
+ public string OldUsername { get; set; }
+
+ [Required, ValidateWith(typeof(UsernameValidator))]
+ public string NewUsername { get; set; }
+ }
+
public class ChangePasswordRequest
{
[Required]