refactor: use controller base class

This commit is contained in:
Derrick Hammer 2023-06-09 04:05:19 -04:00
parent 73e1c5a363
commit 34be432af7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 6 deletions

View File

@ -12,7 +12,7 @@ import (
)
type FilesController struct {
Ctx iris.Context
Controller
}
func (f *FilesController) PostUpload() {
@ -95,11 +95,7 @@ func (f *FilesController) GetStatusBy(cidString string) {
break
}
err := ctx.JSON(&response.StatusResponse{Status: statusCode})
if err != nil {
logger.Get().Error("failed to create response", zap.Error(err))
}
f.respondJSON(&response.StatusResponse{Status: statusCode})
}
func validateCid(cidString string, validateStatus bool, ctx iris.Context) (string, bool) {