Major API rework for paradigm change (#10)

* start with group permissions implementation

* refactor group dto stuff

* adjustments to api as necessary from client

* more api refactor for UserData

* use implicit usings and file scoped namespaces

* fix userpermissionsextensions

* fix extenions

* add more comparers

* adjust comparers

* remove admin stuff (tbd migration to discord bot)

* adjust extensions

* code style for api

---------

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
rootdarkarchon
2023-01-29 15:14:33 +01:00
committed by GitHub
parent 2015496ec0
commit 0d04aaafac
66 changed files with 669 additions and 378 deletions

View File

@@ -0,0 +1,11 @@
namespace MareSynchronos.API.Dto.Files;
public record DownloadFileDto : ITransferFileDto
{
public bool FileExists { get; set; } = true;
public string Hash { get; set; } = string.Empty;
public string Url { get; set; } = string.Empty;
public long Size { get; set; } = 0;
public bool IsForbidden { get; set; } = false;
public string ForbiddenBy { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,7 @@
namespace MareSynchronos.API.Dto.Files;
public record ForbiddenFileDto
{
public string Hash { get; set; } = string.Empty;
public string ForbiddenBy { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,8 @@
namespace MareSynchronos.API.Dto.Files;
public interface ITransferFileDto
{
string Hash { get; set; }
bool IsForbidden { get; set; }
string ForbiddenBy { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace MareSynchronos.API.Dto.Files;
public record UploadFileDto : ITransferFileDto
{
public string Hash { get; set; } = string.Empty;
public bool IsForbidden { get; set; } = false;
public string ForbiddenBy { get; set; } = string.Empty;
}