diff --git a/handler/users.go b/handler/users.go index c00623d..9868419 100644 --- a/handler/users.go +++ b/handler/users.go @@ -36,7 +36,7 @@ func (h *Handler) GetUser(c echo.Context) error { return c.NoContent(http.StatusBadRequest) } - tx := h.DB.Preload("Position").Where("id = ?", id).Find(user) + tx := h.DB.Preload("Position").Where("id = ?", id).Find(&user) if tx.RowsAffected == 0 { return c.NoContent(http.StatusNotFound)