This commit is contained in:
mattyatea 2024-06-12 16:02:42 +09:00
parent 833031ee60
commit e90fda3386
2 changed files with 5 additions and 9 deletions

View File

@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import type { Provider } from '@nestjs/common';
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
import { import {
@ -29,8 +28,6 @@ import {
MiDriveFolder, MiDriveFolder,
MiEmoji, MiEmoji,
MiEmojiRequest, MiEmojiRequest,
MiBubbleGameRecord,
MiFollowRequest,
MiFlash, MiFlash,
MiFlashLike, MiFlashLike,
MiFollowRequest, MiFollowRequest,
@ -82,8 +79,8 @@ import {
MiUserSecurityKey, MiUserSecurityKey,
MiWebhook, MiWebhook,
MiScheduledNote, MiScheduledNote,
MiBubbleGameRecord MiBubbleGameRecord } from './_.js';
, MiReversiGame } from './_.js'; import type { Provider } from '@nestjs/common';
import type { DataSource } from 'typeorm'; import type { DataSource } from 'typeorm';
const $usersRepository: Provider = { const $usersRepository: Provider = {

View File

@ -2,7 +2,6 @@
* SPDX-FileCopyrightText: syuilo and misskey-project * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import { Injectable } from '@nestjs/common';
import { setImmediate } from 'node:timers/promises'; import { setImmediate } from 'node:timers/promises';
import sanitizeHtml from 'sanitize-html'; import sanitizeHtml from 'sanitize-html';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
@ -93,13 +92,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} }
const notes = ps.noteIds ? await this.notesRepository.find({ 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({ const report = await this.abuseUserReportsRepository.insert({
id: this.idService.gen(), id: this.idService.gen(),
targetUserId: user.id, targetUserId: targetUser.id,
targetUserHost: user.host, targetUserHost: targetUser.host,
reporterId: me.id, reporterId: me.id,
reporterHost: null, reporterHost: null,
comment: ps.comment, comment: ps.comment,