Add file ID support to FileItem and update related components for consistency
This commit is contained in:
@@ -338,6 +338,7 @@ func listFilesHandler(w http.ResponseWriter, r *http.Request, db *database.DB) {
|
||||
out := make([]map[string]interface{}, 0, len(files))
|
||||
for _, f := range files {
|
||||
out = append(out, map[string]interface{}{
|
||||
"id": f.ID.String(),
|
||||
"name": f.Name,
|
||||
"path": f.Path,
|
||||
"type": f.Type,
|
||||
@@ -884,6 +885,7 @@ func userFilesHandler(w http.ResponseWriter, r *http.Request, db *database.DB) {
|
||||
out := make([]map[string]interface{}, 0, len(files))
|
||||
for _, f := range files {
|
||||
out = append(out, map[string]interface{}{
|
||||
"id": f.ID.String(),
|
||||
"name": f.Name,
|
||||
"path": f.Path,
|
||||
"type": f.Type,
|
||||
|
||||
Reference in New Issue
Block a user