diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-19 21:37:15 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-19 21:37:15 +0800 |
commit | b00cfa30a4f6a1c6d896d46da7dd063abf632cd3 (patch) | |
tree | e6168234660307247111ee369a0b2123823614eb /Timeline/Models/Http/User.cs | |
parent | 2984abc9aa0429380459e5b5b6fda2d20058041b (diff) | |
download | timeline-b00cfa30a4f6a1c6d896d46da7dd063abf632cd3.tar.gz timeline-b00cfa30a4f6a1c6d896d46da7dd063abf632cd3.tar.bz2 timeline-b00cfa30a4f6a1c6d896d46da7dd063abf632cd3.zip |
...
Diffstat (limited to 'Timeline/Models/Http/User.cs')
-rw-r--r-- | Timeline/Models/Http/User.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Timeline/Models/Http/User.cs b/Timeline/Models/Http/User.cs index 4308a19c..98406fec 100644 --- a/Timeline/Models/Http/User.cs +++ b/Timeline/Models/Http/User.cs @@ -6,31 +6,31 @@ namespace Timeline.Models.Http public class UserPutRequest
{
[Required]
- public string Password { get; set; }
+ public string Password { get; set; } = default!;
[Required]
public bool? Administrator { get; set; }
}
public class UserPatchRequest
{
- public string Password { get; set; }
+ public string? Password { get; set; }
public bool? Administrator { get; set; }
}
public class ChangeUsernameRequest
{
[Required]
- public string OldUsername { get; set; }
+ public string OldUsername { get; set; } = default!;
[Required, ValidateWith(typeof(UsernameValidator))]
- public string NewUsername { get; set; }
+ public string NewUsername { get; set; } = default!;
}
public class ChangePasswordRequest
{
[Required]
- public string OldPassword { get; set; }
+ public string OldPassword { get; set; } = default!;
[Required]
- public string NewPassword { get; set; }
+ public string NewPassword { get; set; } = default!;
}
}
|