Files: added private

This commit is contained in:
Maksim Chegulov 2022-07-13 17:10:51 +03:00
parent c03e1a443a
commit 5116642b95
2 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,7 @@ public class FolderDto<T> : FileEntryDto<T>
public IEnumerable<string> Tags { get; set; }
public Logo Logo { get; set; }
public bool Pinned { get; set; }
public bool Private { get; set; }
public FolderDto() { }
@ -150,7 +151,8 @@ public class FolderDtoHelper : FileEntryDtoHelper
result.IsFavorite = folder.IsFavorite.NullIfDefault();
result.New = folder.NewForMe;
result.Pinned = folder.Pinned;
result.Private = folder.Private;
return result;
}
}
}

View File

@ -559,7 +559,7 @@ public class FileStorageService<T> //: IFileStorageService
newFolder.Title = title;
newFolder.ParentId = parent.Id;
newFolder.FolderType = folderType;
newFolder.Private = privacy;
newFolder.Private = parent.Private ? parent.Private : privacy;
var folderId = await folderDao.SaveFolderAsync(newFolder);
var folder = await folderDao.GetFolderAsync(folderId);