use the right struct to create user

This commit is contained in:
kiwiidb
2022-02-15 16:46:32 +01:00
parent 06e4257aaa
commit a44d9052e7
2 changed files with 9 additions and 9 deletions

View File

@@ -20,17 +20,17 @@ type CreateUserResponseBody struct {
Login string `json:"login"`
Password string `json:"password"`
}
type CreateUserRequestBody struct {
Login string `json:"login"`
Password string `json:"password"`
PartnerID string `json:"partnerid"`
AccountType string `json:"accounttype"`
}
// CreateUser : Create user Controller
func (controller *CreateUserController) CreateUser(c echo.Context) error {
// optional parameters that we currently do not use
type RequestBody struct {
Login string `json:"login"`
Password string `json:"password"`
PartnerID string `json:"partnerid"`
AccountType string `json:"accounttype"`
}
var body RequestBody
var body CreateUserRequestBody
if err := c.Bind(&body); err != nil {
return err