mirror of
https://github.com/directus/directus.git
synced 2026-01-27 00:29:06 -05:00
fix roles aggregation query to fit all db vendors (#10050)
* fix roles aggregation query to fit all db vendors * Small opinionated style tweak 🧹 Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -132,8 +132,15 @@ export default defineComponent({
|
||||
const response = await api.get(`/roles`, {
|
||||
params: {
|
||||
limit: -1,
|
||||
fields: 'id,name,description,icon,users.role',
|
||||
deep: { users: { _aggregate: { count: 'id' } } },
|
||||
fields: ['id', 'name', 'description', 'icon', 'users'],
|
||||
deep: {
|
||||
users: {
|
||||
_aggregate: { count: 'id' },
|
||||
_groupBy: ['role'],
|
||||
_sort: 'role',
|
||||
_limit: -1,
|
||||
},
|
||||
},
|
||||
sort: 'name',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user