refactor: change download controller method to use a path argument and not a query
This commit is contained in:
parent
90e4ce6408
commit
b44b12f85e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue