UPDATE: new db
All checks were successful
Build and Release / release (push) Successful in 1m30s

This commit is contained in:
2026-05-05 16:57:44 +07:00
parent 8b440ad5c8
commit 29944915cd
25 changed files with 893 additions and 110 deletions

View File

@@ -7,6 +7,8 @@ import (
"reflect"
"strings"
"history-api/pkg/constants"
"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v3"
"github.com/google/uuid"
@@ -53,6 +55,14 @@ func init() {
}
return u.Version() == 7
})
validate.RegisterValidation("slug", func(fl validator.FieldLevel) bool {
val := fl.Field().String()
if val == "" {
return true
}
return constants.SLUG_REGEX.MatchString(val)
})
}
func isValidURL(s string) bool {