From afaf47acd3c0a57297be5327f39bbbd73a79a862 Mon Sep 17 00:00:00 2001 From: andrusyakka Date: Fri, 14 Jul 2023 16:20:32 +0300 Subject: [PATCH] fix mistake --- handler/users.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)