improving fav detection logic
This commit is contained in:
@@ -14,7 +14,11 @@ export default (router, tpl) => {
|
||||
|
||||
let contextUrl = `/${req.params.itemid}`;
|
||||
if (query.tag) contextUrl = `/tag/${query.tag}/${req.params.itemid}`;
|
||||
if (query.user) contextUrl = `/user/${query.user}/${req.params.itemid}`; // User filter takes precedence if both? usually mutually exclusive
|
||||
if (query.user) {
|
||||
contextUrl = query.fav === 'true'
|
||||
? `/user/${query.user}/favs/${req.params.itemid}`
|
||||
: `/user/${query.user}/${req.params.itemid}`;
|
||||
}
|
||||
|
||||
const data = await f0cklib.getf0ck({
|
||||
itemid: req.params.itemid,
|
||||
|
||||
Reference in New Issue
Block a user