feat: 重构认证控制器,统一类型命名为auth

This commit is contained in:
2025-12-17 16:22:10 +08:00
parent fe9601baf4
commit 70c9094001
3 changed files with 14 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ import (
)
// @provider
type authController struct {
type auth struct {
app *app.Config
jwt *jwt.JWT
}
@@ -27,7 +27,7 @@ type authController struct {
//
// @Router /super/v1/auth/login [post]
// @Bind form body
func (ctl *authController) login(ctx fiber.Ctx, form *dto.LoginForm) (*dto.LoginResponse, error) {
func (ctl *auth) login(ctx fiber.Ctx, form *dto.LoginForm) (*dto.LoginResponse, error) {
m, err := services.User.FindByUsername(ctx, form.Username)
if err != nil {
return nil, errorx.Wrap(err).WithMsg("用户名或密码错误")