fix tag order

This commit is contained in:
Flummi 2022-01-07 18:51:29 +01:00
parent 2e013317a5
commit 1262b12ee4

View File

@ -101,7 +101,8 @@ export default new class {
.select("tags.id", "tags.tag", "user.user") .select("tags.id", "tags.tag", "user.user")
.leftJoin("tags", "tags.id", "tags_assign.tag_id") .leftJoin("tags", "tags.id", "tags_assign.tag_id")
.leftJoin("user", "user.id", "tags_assign.user_id") .leftJoin("user", "user.id", "tags_assign.user_id")
.where("tags_assign.item_id", itemid); .where("tags_assign.item_id", itemid)
.orderBy("tags.id", "asc");
for(let t = 0; t < tags.length; t++) { for(let t = 0; t < tags.length; t++) {
if(tags[t].tag.startsWith(">")) if(tags[t].tag.startsWith(">"))
tags[t].badge = "badge-greentext badge-light"; tags[t].badge = "badge-greentext badge-light";