From b44b12f85e0104415fa04fe49bc911bb8ea105e5 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 10 May 2023 15:09:18 -0400 Subject: [PATCH] refactor: change download controller method to use a path argument and not a query --- controller/files.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/controller/files.go b/controller/files.go index 0e7afbf..2c4251a 100644 --- a/controller/files.go +++ b/controller/files.go @@ -38,11 +38,9 @@ func (f *FilesController) PostUpload() { _ = ctx.JSON(&UploadResponse{Cid: cidString}) } -func (f *FilesController) GetDownload() { +func (f *FilesController) GetDownloadBy(cidString string) { ctx := f.Ctx - cidString := ctx.URLParam("cid") - _, err := cid.Valid(cidString) if sendError(ctx, err, iris.StatusBadRequest) { return