refactor: 移除不必要的上下文调用,简化服务方法参数

This commit is contained in:
2025-12-30 22:14:22 +08:00
parent c8f6cb0b34
commit e5064db577
12 changed files with 67 additions and 67 deletions

View File

@@ -22,7 +22,7 @@ type auth struct{}
// @Success 200 {object} dto.LoginResponse
// @Bind form body
func (c *auth) Login(ctx fiber.Ctx, form *dto.LoginForm) (*dto.LoginResponse, error) {
return services.Super.Login(ctx.Context(), form)
return services.Super.Login(ctx, form)
}
// Check Token
@@ -35,5 +35,5 @@ func (c *auth) Login(ctx fiber.Ctx, form *dto.LoginForm) (*dto.LoginResponse, er
// @Produce json
// @Success 200 {object} dto.LoginResponse
func (c *auth) CheckToken(ctx fiber.Ctx) (*dto.LoginResponse, error) {
return services.Super.CheckToken(ctx.Context())
return services.Super.CheckToken(ctx)
}