displaying all tags for logged in users, not applying nsfp list
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import db from "../../inc/sql.mjs";
|
||||
import cfg from "../../inc/config.mjs";
|
||||
import lib from "../../inc/lib.mjs";
|
||||
import f0cklib from "../routeinc/f0cklib.mjs";
|
||||
|
||||
export default (router, tpl) => {
|
||||
router.get(/^\/tags$/, async (req, res) => {
|
||||
@@ -20,9 +18,21 @@ export default (router, tpl) => {
|
||||
LIMIT 500
|
||||
;
|
||||
`;
|
||||
|
||||
const toptags_regged = await db`
|
||||
SELECT t.id, t.tag, COUNT(DISTINCT ta.item_id) AS total_items
|
||||
FROM tags t
|
||||
LEFT JOIN tags_assign ta ON t.id = ta.tag_id
|
||||
GROUP BY t.id, t.tag
|
||||
ORDER BY total_items DESC
|
||||
LIMIT 500
|
||||
;
|
||||
`;
|
||||
|
||||
res.reply({
|
||||
body: tpl.render('tags', {
|
||||
toptags,
|
||||
toptags_regged,
|
||||
phrase,
|
||||
tmp: null
|
||||
}, req)
|
||||
|
Reference in New Issue
Block a user