Feat: embed static files

This commit is contained in:
HFO4
2020-03-09 14:07:36 +08:00
parent 1d0d6e5f31
commit 30311d181d
9 changed files with 80 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/HFO4/cloudreve/models"
"github.com/HFO4/cloudreve/pkg/serializer"
"github.com/gin-gonic/gin"
"gopkg.in/go-playground/validator.v8"
"gopkg.in/go-playground/validator.v9"
)
// ParamErrorMsg 根据Validator返回的错误信息给出错误提示
@@ -41,7 +41,7 @@ func ErrorResponse(err error) serializer.Response {
if ve, ok := err.(validator.ValidationErrors); ok {
for _, e := range ve {
return serializer.ParamErr(
ParamErrorMsg(e.Field, e.Tag),
ParamErrorMsg(e.Field(), e.Tag()),
err,
)
}