updated controllers and some services to use async/await

This commit is contained in:
Cameron
2024-08-29 05:36:01 -05:00
parent 18de6d599b
commit 8302e3ea61
36 changed files with 1981 additions and 1809 deletions

View File

@@ -1,28 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace ComiServ.Entities
namespace ComiServ.Entities;
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum UserTypeEnum
{
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum UserTypeEnum
{
//important that this is 0 as a safety precaution,
//in case it's accidentally left as default
Invalid = 0,
//can create accounts
Administrator = 1,
//has basic access
User = 2,
//authenticates but does not give access
Restricted = 3,
//refuses to authenticate but maintains records
Disabled = 4,
}
public class UserType
{
public UserTypeEnum Id { get; set; }
[MaxLength(26)]
public string Name { get; set; }
public ICollection<User> Users { get; set; }
}
//important that this is 0 as a safety precaution,
//in case it's accidentally left as default
Invalid = 0,
//can create accounts
Administrator = 1,
//has basic access
User = 2,
//authenticates but does not give access
Restricted = 3,
//refuses to authenticate but maintains records
Disabled = 4,
}
public class UserType
{
public UserTypeEnum Id { get; set; }
[MaxLength(26)]
public string Name { get; set; }
public ICollection<User> Users { get; set; }
}