remove password

This commit is contained in:
kandrusyak
2023-07-14 15:13:53 +03:00
parent 0200810eae
commit 567d07ce89

View File

@@ -42,7 +42,7 @@ func (h *Handler) GetUsers(c echo.Context) error {
utils.ApplySort(tx, sortCol, isDesc)
utils.ApplyFilters(tx, filterCol, filterVal)
tx = tx.Preload("Position").Find(&users)
tx = tx.Preload("Position").Omit("Password").Find(&users)
if tx.RowsAffected == 1 {
return c.JSON(http.StatusOK, users[0])