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:
11
MareSynchronosAPI/Dto/Files/DownloadFileDto.cs
Normal file
11
MareSynchronosAPI/Dto/Files/DownloadFileDto.cs
Normal 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;
|
||||
}
|
||||
7
MareSynchronosAPI/Dto/Files/ForbiddenUploadsDto.cs
Normal file
7
MareSynchronosAPI/Dto/Files/ForbiddenUploadsDto.cs
Normal 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;
|
||||
}
|
||||
8
MareSynchronosAPI/Dto/Files/ITransferFileDto.cs
Normal file
8
MareSynchronosAPI/Dto/Files/ITransferFileDto.cs
Normal 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; }
|
||||
}
|
||||
8
MareSynchronosAPI/Dto/Files/UploadFileDto.cs
Normal file
8
MareSynchronosAPI/Dto/Files/UploadFileDto.cs
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user