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

@@ -180,7 +180,7 @@ func NewTestEnv(t interface {
taskSvc := service.NewTaskService(taskStore, appStore, fileStore, blobStore, stagingSvc, jobSvc, workDir, logger)
appSvc := service.NewApplicationService(appStore, jobSvc, workDir, logger, taskSvc)
uploadSvc := service.NewUploadService(mockMinIO, blobStore, fileStore, uploadStore, minioCfg, db, logger)
fileSvc := service.NewFileService(mockMinIO, blobStore, fileStore, minioCfg.Bucket, db, logger)
fileSvc := service.NewFileService(mockMinIO, blobStore, fileStore, folderStore, minioCfg.Bucket, db, logger)
// 9. All 7 Handler instances
jobH := handler.NewJobHandler(jobSvc, logger)