mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-13 02:55:04 +08:00
Sort roles by created date.
This commit is contained in:
parent
d52eac0948
commit
17b5cc1774
1 changed files with 1 additions and 1 deletions
|
@ -1119,7 +1119,7 @@ listPerms AS (
|
|||
WHERE ur.parent_id IS NOT NULL GROUP BY ur.parent_id
|
||||
)
|
||||
SELECT p.*, COALESCE(l.listPerms, '[]'::JSONB) AS "list_permissions" FROM mainroles p
|
||||
LEFT JOIN listPerms l ON p.id = l.parent_id;
|
||||
LEFT JOIN listPerms l ON p.id = l.parent_id ORDER BY p.created_at;
|
||||
|
||||
-- name: create-role
|
||||
INSERT INTO user_roles (name, permissions, created_at, updated_at) VALUES($1, $2, NOW(), NOW()) RETURNING *;
|
||||
|
|
Loading…
Reference in a new issue