Added User with ability to login and register. By default, user is not an admin. DTO expects an integer and will convert to Boolean.
This commit is contained in:
parent
2b521924d0
commit
5da41ea6f3
12 changed files with 239 additions and 10 deletions
|
|
@ -1,4 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
using API.Converters;
|
||||
|
||||
namespace API.DTOs
|
||||
{
|
||||
|
|
@ -9,5 +11,7 @@ namespace API.DTOs
|
|||
[Required]
|
||||
[StringLength(8, MinimumLength = 4)]
|
||||
public string Password { get; set; }
|
||||
[JsonConverter(typeof(JsonBoolNumberConverter))]
|
||||
public bool IsAdmin { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -4,5 +4,6 @@
|
|||
{
|
||||
public string Username { get; set; }
|
||||
public string Token { get; set; }
|
||||
public bool IsAdmin { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue