mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-13 11:02:18 -04:00
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:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user