package controller import ( "github.com/gin-gonic/gin" "gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/resp" "gitlab.wodcloud.com/smart-operation/so-operation-api/src/service" ) func AddFile(c *gin.Context) { docLibSvc := service.DocLibSvc{} doc, err := docLibSvc.AddFile(c) if err != nil { SendJsonResponse(c, resp.FAIL.WithError(err), nil) return } SendJsonResponse(c, resp.OK, doc) }