UniStore: Get Folder Handler return Root Folder (general) (#98127)

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
This commit is contained in:
maicon
2024-12-18 22:31:55 -03:00
committed by GitHub
parent 721c50a304
commit 2e08092a34
3 changed files with 175 additions and 2 deletions
+8 -1
View File
@@ -92,13 +92,20 @@ func UnstructuredToLegacyFolder(item unstructured.Unstructured, orgID int64) (*f
createdTime = (*created).UTC()
}
url := getURL(meta, title)
// RootFolder does not have URL
if uid == folder.RootFolder.UID {
url = ""
}
f := &folder.Folder{
UID: uid,
Title: title,
ID: id,
ParentUID: meta.GetFolder(),
// #TODO add created by field if necessary
URL: getURL(meta, title),
URL: url,
// #TODO get Created in format "2024-09-12T15:37:41.09466+02:00"
Created: createdTime,
// #TODO figure out whether we want to set "updated" and "updated by". Could replace with