mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
fixes for standard configs
This commit is contained in:
parent
fd23cca840
commit
5b136685db
6 changed files with 8 additions and 88 deletions
|
|
@ -30,7 +30,6 @@ public class FileService : MareSynchronosShared.Protos.FileService.FileServiceBa
|
|||
|
||||
public override async Task<Empty> UploadFile(UploadFileRequest request, ServerCallContext context)
|
||||
{
|
||||
|
||||
var filePath = Path.Combine(_basePath, request.Hash);
|
||||
var file = await _mareDbContext.Files.SingleOrDefaultAsync(f => f.Hash == request.Hash && f.UploaderUID == request.Uploader);
|
||||
if (file != null)
|
||||
|
|
@ -83,7 +82,7 @@ public class FileService : MareSynchronosShared.Protos.FileService.FileServiceBa
|
|||
public override Task<FileSizeResponse> GetFileSizes(FileSizeRequest request, ServerCallContext context)
|
||||
{
|
||||
FileSizeResponse response = new();
|
||||
foreach (var hash in request.Hash)
|
||||
foreach (var hash in request.Hash.Distinct())
|
||||
{
|
||||
FileInfo fi = new(Path.Combine(_basePath, hash));
|
||||
if (fi.Exists)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue