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

@@ -185,7 +185,7 @@ func setupFileTestRouter(t *testing.T) (*gin.Engine, *gorm.DB, *inMemoryStorage)
uploadSvc := service.NewUploadService(memStore, blobStore, fileStore, uploadStore, cfg, db, zap.NewNop())
_ = service.NewDownloadService(memStore, blobStore, fileStore, "files", zap.NewNop())
folderSvc := service.NewFolderService(folderStore, fileStore, zap.NewNop())
fileSvc := service.NewFileService(memStore, blobStore, fileStore, "files", db, zap.NewNop())
fileSvc := service.NewFileService(memStore, blobStore, fileStore, folderStore, "files", db, zap.NewNop())
uploadH := handler.NewUploadHandler(uploadSvc, zap.NewNop())
fileH := handler.NewFileHandler(fileSvc, zap.NewNop())