Skip to content

Commit

Permalink
Sory users by created_at always.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Oct 13, 2024
1 parent eb47e80 commit 0331e3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ UPDATE users SET
WHEN $9 > 0 THEN (SELECT id FROM roles WHERE id = $9 AND type = 'list')
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;

-- name: delete-users
Expand Down Expand Up @@ -1136,7 +1137,8 @@ FROM users
WHEN $3::TEXT != '' THEN email = $3
ELSE TRUE
END
);
)
ORDER BY users.created_at;


-- name: get-api-tokens
Expand Down

0 comments on commit 0331e3c

Please sign in to comment.