NestedFolders: Return full folder hierarchy in Folder response (#66835)

* Delete redundant struct

* Include parent folders in DTO

* Add test

* Update swagger
This commit is contained in:
Sofia Papagiannaki
2023-04-25 11:22:20 +03:00
committed by GitHub
parent 5c2a344ce1
commit 7dbcd5ecd0
6 changed files with 153 additions and 36 deletions

View File

@@ -48,12 +48,6 @@ func (f *Folder) IsGeneral() bool {
return f.ID == GeneralFolder.ID && f.Title == GeneralFolder.Title
}
type FolderDTO struct {
Folder
Children []FolderDTO
}
// NewFolder tales a title and returns a Folder with the Created and Updated
// fields set to the current time.
func NewFolder(title string, description string) *Folder {