mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 10:54:28 +00:00
fix regex matching in app and function services
This commit is contained in:
@@ -23,7 +23,7 @@ var (
|
|||||||
OwnerKey = "app/owner/"
|
OwnerKey = "app/owner/"
|
||||||
ServiceKey = "app/service/"
|
ServiceKey = "app/service/"
|
||||||
ReservationKey = "app/reservation/"
|
ReservationKey = "app/reservation/"
|
||||||
NameFormat = regexp.MustCompilePOSIX("[a-z0-9]+")
|
NameFormat = regexp.MustCompilePOSIX("^[a-z0-9]+$")
|
||||||
)
|
)
|
||||||
|
|
||||||
type Reservation struct {
|
type Reservation struct {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
IDFormat = regexp.MustCompilePOSIX("[a-z0-9-]+")
|
IDFormat = regexp.MustCompilePOSIX("^[a-z0-9-]+$")
|
||||||
NameFormat = regexp.MustCompilePOSIX("[a-z0-9]+")
|
NameFormat = regexp.MustCompilePOSIX("^[a-z0-9]+$")
|
||||||
|
|
||||||
FunctionKey = "function/func/"
|
FunctionKey = "function/func/"
|
||||||
OwnerKey = "function/owner/"
|
OwnerKey = "function/owner/"
|
||||||
|
|||||||
Reference in New Issue
Block a user