mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-14 11:36:51 +08:00
Sory users by created_at
always.
This commit is contained in:
parent
eb47e80c35
commit
0331e3ce4e
1 changed files with 4 additions and 2 deletions
|
@ -1083,7 +1083,8 @@ UPDATE users SET
|
||||||
WHEN $9 > 0 THEN (SELECT id FROM roles WHERE id = $9 AND type = 'list')
|
WHEN $9 > 0 THEN (SELECT id FROM roles WHERE id = $9 AND type = 'list')
|
||||||
ELSE list_role_id END
|
ELSE list_role_id END
|
||||||
),
|
),
|
||||||
status=(CASE WHEN $10 != '' THEN $10::user_status ELSE status END)
|
status=(CASE WHEN $10 != '' THEN $10::user_status ELSE status END),
|
||||||
|
updated_at=NOW()
|
||||||
WHERE id=$1 AND (SELECT canEdit FROM u) = TRUE;
|
WHERE id=$1 AND (SELECT canEdit FROM u) = TRUE;
|
||||||
|
|
||||||
-- name: delete-users
|
-- name: delete-users
|
||||||
|
@ -1136,7 +1137,8 @@ FROM users
|
||||||
WHEN $3::TEXT != '' THEN email = $3
|
WHEN $3::TEXT != '' THEN email = $3
|
||||||
ELSE TRUE
|
ELSE TRUE
|
||||||
END
|
END
|
||||||
);
|
)
|
||||||
|
ORDER BY users.created_at;
|
||||||
|
|
||||||
|
|
||||||
-- name: get-api-tokens
|
-- name: get-api-tokens
|
||||||
|
|
Loading…
Reference in a new issue