migrate controllers
Some checks failed
build quyun / Build (push) Failing after 1m30s

This commit is contained in:
2025-12-19 23:33:02 +08:00
parent 557a641f41
commit 49072ddd79
37 changed files with 1944 additions and 69 deletions

View File

@@ -3,9 +3,7 @@ package v1
import (
"mime/multipart"
"quyun/v2/app/errorx"
"quyun/v2/app/requests"
"quyun/v2/app/services"
"quyun/v2/providers/jwt"
"github.com/gofiber/fiber/v3"
@@ -63,14 +61,14 @@ func (d *demo) Foo(
file *multipart.FileHeader,
req *FooUploadReq,
) error {
_, err := services.Test.Test(ctx)
if err != nil {
// 示例:在控制器层自定义错误消息/附加数据
appErr := errorx.Wrap(err).
WithMsg("获取测试失败").
WithData(fiber.Map{"route": "/v1/test"}).
WithParams("handler", "Test.Hello")
return appErr
}
// _, err := services.Test.Test(ctx)
// if err != nil {
// // 示例:在控制器层自定义错误消息/附加数据
// appErr := errorx.Wrap(err).
// WithMsg("获取测试失败").
// WithData(fiber.Map{"route": "/v1/test"}).
// WithParams("handler", "Test.Hello")
// return appErr
// }
return nil
}