forked from mirrors/homebox
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:
parent
44f13f751a
commit
607b06d2f2
10 changed files with 162 additions and 52 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue