From 31e6d071faff899d50e1f754cb9381035003bdc4 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 c7ca742e2..8ebe93f20 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 2807dc99d..d981b4a61 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'`)