refactor: update resource id naming

This commit is contained in:
Steven
2024-03-20 20:39:16 +08:00
parent a3a4e37cb0
commit 7cc8b951a3
48 changed files with 704 additions and 693 deletions

View File

@ -269,7 +269,7 @@ func (s *APIV1Service) SignUp(c echo.Context) error {
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Failed to find users").SetInternal(err)
}
if !util.ResourceNameMatcher.MatchString(strings.ToLower(signup.Username)) {
if !util.UIDMatcher.MatchString(strings.ToLower(signup.Username)) {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", signup.Username)).SetInternal(err)
}