Sort roles the other way

This commit is contained in:
Nassim Jahnke 2023-02-15 14:38:40 +01:00
parent bb56e86b28
commit 54d308cae3
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -27,6 +27,6 @@ public interface RolesDAO {
@SqlQuery("SELECT id, created_at, name, category, title, color, assignable, rank, permission::bigint FROM roles WHERE id = :id")
RoleTable getById(long id);
@SqlQuery("SELECT id AS roleid, created_at, name AS value, category AS rolecategory, title, color, assignable, rank, permission::bigint AS permissions FROM roles WHERE category = :category ORDER BY rank DESC")
@SqlQuery("SELECT id AS roleid, created_at, name AS value, category AS rolecategory, title, color, assignable, rank, permission::bigint AS permissions FROM roles WHERE category = :category ORDER BY rank")
List<RoleData> getRoles(RoleCategory category);
}