working commit

This commit is contained in:
2026-02-11 13:47:10 +02:00
parent 75bd5a952b
commit 2e3dbe8f7c
8 changed files with 101 additions and 25 deletions
+3 -3
View File
@@ -253,13 +253,13 @@ type ListFilesParams struct {
Filepath string
}
type ListFilesResult struct {
FileDescrs []descr.File
Files []descr.File `json:"files,omitempty"`
}
func (oper *Operator) ListFiles(ctx context.Context, param *ListFilesParams) (int, *ListFilesResult, error) {
var err error
res := &ListFilesResult{
FileDescrs: make([]descr.File, 0),
Files: make([]descr.File, 0),
}
// TODO: convert file path to a unified and secure state
@@ -276,7 +276,7 @@ func (oper *Operator) ListFiles(ctx context.Context, param *ListFilesParams) (in
return code, res, err
}
for _, item := range fileDescrs {
res.FileDescrs = append(res.FileDescrs, item)
res.Files = append(res.Files, item)
}
code := http.StatusOK
return code, res, err