feat: phone validation
Some checks failed
build quyun / Build (push) Failing after 1m25s

This commit is contained in:
2025-12-20 11:47:45 +08:00
parent fdbf26d751
commit 0e4af79b53
31 changed files with 1130 additions and 984 deletions

View File

@@ -16,7 +16,7 @@ func (f *Middlewares) AuthFrontend(ctx fiber.Ctx) error {
return ctx.Next()
}
if f.app.IsDevMode() && true {
if f.app.IsDevMode() && false {
user, err := services.Users.FindByID(ctx.Context(), 1001)
if err != nil {
return ctx.Send([]byte("User not found"))
@@ -33,7 +33,7 @@ func (f *Middlewares) AuthFrontend(ctx fiber.Ctx) error {
query := u.Query()
query.Set("redirect", fullUrl)
u.RawQuery = query.Encode()
u.Path = "/v1/auth/wechat" // TODO: use phone validation
u.Path = "/v1/auth/phone"
fullUrl = u.String()
// check cookie exists