forked from DebaucheryLibrarian/traxxx
Move tag posters and photos to media database.
This commit is contained in:
@@ -10,7 +10,7 @@ async function fetchTagsApi(req, res) {
|
||||
const tags = await fetchTags({
|
||||
id: tagId,
|
||||
slug: tagSlug,
|
||||
}, req.query.limit);
|
||||
}, null, req.query.limit);
|
||||
|
||||
if (tags.length > 0) {
|
||||
res.send(tags[0]);
|
||||
@@ -21,9 +21,16 @@ async function fetchTagsApi(req, res) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tags = await fetchTags({
|
||||
priority: req.query.priority.split(','),
|
||||
}, req.query.limit);
|
||||
const query = {};
|
||||
const groupsQuery = {};
|
||||
|
||||
if (req.query.priority) query.priority = req.query.priority.split(',');
|
||||
if (req.query.slug) query.slug = req.query.slug.split(',');
|
||||
if (req.query.group) {
|
||||
groupsQuery.slug = req.query.group.split(',');
|
||||
}
|
||||
|
||||
const tags = await fetchTags(query, groupsQuery, req.query.limit);
|
||||
|
||||
res.send(tags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user