fix mistake

This commit is contained in:
andrusyakka
2023-07-14 16:20:32 +03:00
parent 459c5bebad
commit afaf47acd3

View File

@@ -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)