From aa2c8d101ed312ea4d5a83017b381cb58d7a5491 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 18 Feb 2020 08:13:47 +0900 Subject: [PATCH] Fix type --- src/server/api/common/generate-replies-query.ts | 2 +- src/server/api/common/generate-visibility-query.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/common/generate-replies-query.ts b/src/server/api/common/generate-replies-query.ts index c7ca742e2f..8ebe93f20a 100644 --- a/src/server/api/common/generate-replies-query.ts +++ b/src/server/api/common/generate-replies-query.ts @@ -1,7 +1,7 @@ import { User } from '../../../models/entities/user'; import { Brackets, SelectQueryBuilder } from 'typeorm'; -export function generateRepliesQuery(q: SelectQueryBuilder, me?: User) { +export function generateRepliesQuery(q: SelectQueryBuilder, me?: User | null) { if (me == null) { q.andWhere(new Brackets(qb => { qb .where(`note.replyId IS NULL`) // 返信ではない diff --git a/src/server/api/common/generate-visibility-query.ts b/src/server/api/common/generate-visibility-query.ts index 2807dc99dc..d981b4a613 100644 --- a/src/server/api/common/generate-visibility-query.ts +++ b/src/server/api/common/generate-visibility-query.ts @@ -2,7 +2,7 @@ import { User } from '../../../models/entities/user'; import { Followings } from '../../../models'; import { Brackets, SelectQueryBuilder } from 'typeorm'; -export function generateVisibilityQuery(q: SelectQueryBuilder, me?: User) { +export function generateVisibilityQuery(q: SelectQueryBuilder, me?: User | null) { if (me == null) { q.andWhere(new Brackets(qb => { qb .where(`note.visibility = 'public'`)