Implement featured note injection
This commit is contained in:
parent
3d79e7a136
commit
d9986b7a2f
19 changed files with 117 additions and 16 deletions
|
|
@ -46,6 +46,7 @@ export default define(meta, async (ps, user) => {
|
|||
const query = Notes.createQueryBuilder('note')
|
||||
.addSelect('note.score')
|
||||
.where('note.userHost IS NULL')
|
||||
.andWhere(`note.score > 0`)
|
||||
.andWhere(`note.createdAt > :date`, { date: new Date(Date.now() - day) })
|
||||
.andWhere(`note.visibility = 'public'`)
|
||||
.leftJoinAndSelect('note.user', 'user');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue