feat(handler): update GetFile and ListFiles handlers for new FileResponse fields

- GetFile uses new GetFileResponse instead of manual FileResponse construction

- ListFiles handler parses optional user_id query parameter

- Wire FolderStore into FileService in app.go, testenv, and file_test

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
dailz
2026-04-16 16:04:43 +08:00
parent 1d591efeba
commit 29525c3fa9
5 changed files with 37 additions and 31 deletions

View File

@@ -188,7 +188,7 @@ func initHTTPServer(cfg *config.Config, db *gorm.DB, slurmClient *slurm.Client,
uploadSvc := service.NewUploadService(minioClient, blobStore, fileStore, uploadStore, cfg.Minio, db, logger)
folderSvc := service.NewFolderService(folderStore, fileStore, logger)
fileSvc := service.NewFileService(minioClient, blobStore, fileStore, cfg.Minio.Bucket, db, logger)
fileSvc := service.NewFileService(minioClient, blobStore, fileStore, folderStore, cfg.Minio.Bucket, db, logger)
uploadH = handler.NewUploadHandler(uploadSvc, logger)
fileH = handler.NewFileHandler(fileSvc, logger)