fix (backend): note.score is selected by default
This commit is contained in:
parent
7e0d0b7fcd
commit
6ffd67ce38
3 changed files with 0 additions and 3 deletions
|
@ -19,7 +19,6 @@ export async function injectFeatured(timeline: Note[], user?: User | null) {
|
||||||
const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで
|
const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで
|
||||||
|
|
||||||
const query = Notes.createQueryBuilder("note")
|
const query = Notes.createQueryBuilder("note")
|
||||||
.addSelect("note.score")
|
|
||||||
.where("note.userHost IS NULL")
|
.where("note.userHost IS NULL")
|
||||||
.andWhere("note.score > 0")
|
.andWhere("note.score > 0")
|
||||||
.andWhere("note.createdAt > :date", { date: new Date(Date.now() - day) })
|
.andWhere("note.createdAt > :date", { date: new Date(Date.now() - day) })
|
||||||
|
|
|
@ -42,7 +42,6 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
const day = 1000 * 60 * 60 * 24 * ps.days;
|
const day = 1000 * 60 * 60 * 24 * ps.days;
|
||||||
|
|
||||||
const query = Notes.createQueryBuilder("note")
|
const query = Notes.createQueryBuilder("note")
|
||||||
.addSelect("note.score")
|
|
||||||
.andWhere("note.score > 0")
|
.andWhere("note.score > 0")
|
||||||
.andWhere("note.createdAt > :date", { date: new Date(Date.now() - day) })
|
.andWhere("note.createdAt > :date", { date: new Date(Date.now() - day) })
|
||||||
.andWhere("note.visibility = 'public'")
|
.andWhere("note.visibility = 'public'")
|
||||||
|
|
|
@ -360,7 +360,6 @@ export class MiscHelpers {
|
||||||
): Promise<MastodonEntity.Status[]> {
|
): Promise<MastodonEntity.Status[]> {
|
||||||
if (limit > 40) limit = 40;
|
if (limit > 40) limit = 40;
|
||||||
const query = Notes.createQueryBuilder("note")
|
const query = Notes.createQueryBuilder("note")
|
||||||
.addSelect("note.score")
|
|
||||||
.andWhere("note.score > 0")
|
.andWhere("note.score > 0")
|
||||||
.andWhere("note.createdAt > :date", {
|
.andWhere("note.createdAt > :date", {
|
||||||
date: new Date(Date.now() - 1000 * 60 * 60 * 24),
|
date: new Date(Date.now() - 1000 * 60 * 60 * 24),
|
||||||
|
|
Loading…
Reference in a new issue