feat: phone validate

This commit is contained in:
2025-12-20 12:56:06 +08:00
parent 22e288bf98
commit dbeb0a5733
19 changed files with 397 additions and 89 deletions

View File

@@ -16,6 +16,16 @@ func (f *Middlewares) AuthFrontend(ctx fiber.Ctx) error {
return ctx.Next()
}
if ctx.Path() == "/v1/posts" {
return ctx.Next()
}
if strings.HasPrefix(ctx.Path(), "/v1/posts/") && strings.HasSuffix(ctx.Path(), "show") {
return ctx.Next()
}
if strings.HasPrefix(ctx.Path(), "/v1/posts/") && strings.HasSuffix(ctx.Path(), "play") {
return ctx.Next()
}
if f.app.IsDevMode() && false {
user, err := services.Users.FindByID(ctx.Context(), 1001)
if err != nil {