diff options
author | crupest <crupest@outlook.com> | 2021-03-06 23:04:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-06 23:04:13 +0800 |
commit | f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618 (patch) | |
tree | 59507331750831118e7caa071a10e1cb8fc1e627 /BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs | |
parent | 736ba716cfb87bc0e8e4979825a1693dc6010f9c (diff) | |
parent | 8f09e3172f249a9f5d229040415a0569e9d1c01b (diff) | |
download | timeline-f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618.tar.gz timeline-f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618.tar.bz2 timeline-f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618.zip |
Merge pull request #347 from crupest/markdown
Markdown post auto translate data url.
Diffstat (limited to 'BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs')
-rw-r--r-- | BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs b/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs new file mode 100644 index 00000000..c8cc004b --- /dev/null +++ b/BackEnd/Timeline/Models/Http/HttpUserPostRequest.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations;
+using Timeline.Controllers;
+using Timeline.Models.Validation;
+
+namespace Timeline.Models.Http
+{
+ /// <summary>
+ /// Request model for <see cref="UserController.Post(HttpUserPostRequest)"/>.
+ /// </summary>
+ public class HttpUserPostRequest
+ {
+ /// <summary>
+ /// Username of the new user.
+ /// </summary>
+ [Required, Username]
+ public string Username { get; set; } = default!;
+
+ /// <summary>
+ /// Password of the new user.
+ /// </summary>
+ [Required, MinLength(1)]
+ public string Password { get; set; } = default!;
+ }
+}
|