This commit is contained in:
syuilo 2019-04-15 13:11:17 +09:00
parent 075af96338
commit df92b41d25
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -48,6 +48,7 @@ export default define(meta, async (ps) => {
const hashtags = await Hashtags.createQueryBuilder('tag') const hashtags = await Hashtags.createQueryBuilder('tag')
.where('tag.name like :q', { q: ps.query.toLowerCase() + '%' }) .where('tag.name like :q', { q: ps.query.toLowerCase() + '%' })
.orderBy('tag.count', 'DESC') .orderBy('tag.count', 'DESC')
.groupBy('tag.id')
.take(ps.limit!) .take(ps.limit!)
.skip(ps.offset) .skip(ps.offset)
.getMany(); .getMany();