fix: date and datetime regression (#282)

* use custom types.Date implementation

* fix user registration bug

* remove sanity check

* fix datetime bug
This commit is contained in:
Hayden 2023-02-15 08:40:35 -09:00 committed by GitHub
parent 44f13f751a
commit 607b06d2f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 162 additions and 52 deletions

View file

@ -1,6 +1,7 @@
package v1
import (
"fmt"
"net/http"
"github.com/google/uuid"
@ -28,7 +29,7 @@ func (ctrl *V1Controller) HandleUserRegistration() server.HandlerFunc {
}
if !ctrl.allowRegistration && regData.GroupToken == "" {
return validate.NewRequestError(nil, http.StatusForbidden)
return validate.NewRequestError(fmt.Errorf("user registration disabled"), http.StatusForbidden)
}
_, err := ctrl.svc.User.RegisterUser(r.Context(), regData)