feature: Adds user lookup support.
This commit is contained in:
parent
cee4e62f53
commit
611d7f24f8
4 changed files with 142 additions and 5 deletions
|
@ -29,8 +29,6 @@ type UserCreationRequest struct {
|
|||
}
|
||||
|
||||
func CreateUser(c *gin.Context) {
|
||||
var req UserCreationRequest
|
||||
|
||||
if !signupEnabled && !unsafeSignup {
|
||||
c.JSON(http.StatusForbidden, gin.H{
|
||||
"error": "Signing up is not enabled at this time.",
|
||||
|
@ -39,6 +37,8 @@ func CreateUser(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
var req UserCreationRequest
|
||||
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"error": fmt.Sprintf("Failed to parse body: %s", err.Error()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue