chore(be): sql query

This commit is contained in:
Denis Gukov 2024-09-28 16:03:21 +05:00
parent 061806e332
commit c7177fac63

View File

@ -148,7 +148,7 @@ func (d *SqlDb) GetProjectUsers(projectID int, params db.RetrieveQueryParams) (u
case "name", "username", "email": case "name", "username", "email":
q = q.OrderBy("u." + params.SortBy + " " + sortDirection) q = q.OrderBy("u." + params.SortBy + " " + sortDirection)
case "role": case "role":
q = q.OrderBy("pu." + params.SortBy + " " + sortDirection) q = q.OrderBy("pu.role " + sortDirection)
default: default:
q = q.OrderBy("u.name " + sortDirection) q = q.OrderBy("u.name " + sortDirection)
} }