Reorganization of backend + new routes
This commit is contained in:
@@ -9,16 +9,17 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"fr.latosa-escrima/api/core"
|
||||
"fr.latosa-escrima/core"
|
||||
"fr.latosa-escrima/core/models"
|
||||
)
|
||||
|
||||
type UpdateUserArgs struct {
|
||||
FirstName *string `json:"firstname,omitempty"`
|
||||
LastName *string `json:"lastname,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
Phone *string `json:"phone,omitempty"`
|
||||
Attributes *core.UserAttributes `json:"attributes"`
|
||||
FirstName *string `json:"firstname,omitempty"`
|
||||
LastName *string `json:"lastname,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
Phone *string `json:"phone,omitempty"`
|
||||
Attributes *models.UserAttributes `json:"attributes"`
|
||||
}
|
||||
|
||||
func HandleUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -32,7 +33,7 @@ func HandleUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var user core.User
|
||||
var user models.User
|
||||
updateQuery := core.DB.NewUpdate().Model(&user)
|
||||
|
||||
val := reflect.ValueOf(updateArgs)
|
||||
|
||||
Reference in New Issue
Block a user