work on adding group support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
type RegisterInput struct {
|
||||
type AddUserInput struct {
|
||||
UserName string `json:"userName" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
GroupId int `json:"groupId"`
|
||||
@@ -73,8 +73,8 @@ func DeleteUser(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func RegisterUser(c *gin.Context) {
|
||||
var input RegisterInput
|
||||
func AddUser(c *gin.Context) {
|
||||
var input AddUserInput
|
||||
|
||||
if err := c.ShouldBindJSON(&input); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
|
Reference in New Issue
Block a user