From e90fda338647d766ad2047d8cd88864120ea88e6 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Wed, 12 Jun 2024 16:02:42 +0900 Subject: [PATCH] Fix --- packages/backend/src/models/RepositoryModule.ts | 7 ++----- .../backend/src/server/api/endpoints/users/report-abuse.ts | 7 +++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/backend/src/models/RepositoryModule.ts b/packages/backend/src/models/RepositoryModule.ts index 4117394daf..2e0135b2e7 100644 --- a/packages/backend/src/models/RepositoryModule.ts +++ b/packages/backend/src/models/RepositoryModule.ts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import type { Provider } from '@nestjs/common'; import { Module } from '@nestjs/common'; import { DI } from '@/di-symbols.js'; import { @@ -29,8 +28,6 @@ import { MiDriveFolder, MiEmoji, MiEmojiRequest, - MiBubbleGameRecord, - MiFollowRequest, MiFlash, MiFlashLike, MiFollowRequest, @@ -82,8 +79,8 @@ import { MiUserSecurityKey, MiWebhook, MiScheduledNote, - MiBubbleGameRecord -, MiReversiGame } from './_.js'; + MiBubbleGameRecord } from './_.js'; +import type { Provider } from '@nestjs/common'; import type { DataSource } from 'typeorm'; const $usersRepository: Provider = { diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 87631b14f3..dfe27ab21d 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: syuilo and misskey-project * SPDX-License-Identifier: AGPL-3.0-only */ -import { Injectable } from '@nestjs/common'; import { setImmediate } from 'node:timers/promises'; import sanitizeHtml from 'sanitize-html'; import { Inject, Injectable } from '@nestjs/common'; @@ -93,13 +92,13 @@ export default class extends Endpoint { // eslint- } const notes = ps.noteIds ? await this.notesRepository.find({ - where: { id: In(ps.noteIds), userId: user.id }, + where: { id: In(ps.noteIds), userId: targetUser.id }, }) : []; const report = await this.abuseUserReportsRepository.insert({ id: this.idService.gen(), - targetUserId: user.id, - targetUserHost: user.host, + targetUserId: targetUser.id, + targetUserHost: targetUser.host, reporterId: me.id, reporterHost: null, comment: ps.comment,