refactor: prefix Mi for all entities (#11719)

* wip

* wip

* wip

* wip

* Update RepositoryModule.ts

* wip

* wip

* wip

* Revert "wip"

This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
This commit is contained in:
syuilo 2023-08-16 17:51:28 +09:00 committed by GitHub
parent 9264ca336b
commit 792622aead
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
229 changed files with 1990 additions and 1990 deletions

View file

@ -9,8 +9,8 @@ import * as stream from 'node:stream/promises';
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import { getIpHash } from '@/misc/get-ip-hash.js';
import type { LocalUser, User } from '@/models/entities/User.js';
import type { AccessToken } from '@/models/entities/AccessToken.js';
import type { MiLocalUser, MiUser } from '@/models/entities/User.js';
import type { MiAccessToken } from '@/models/entities/AccessToken.js';
import type Logger from '@/logger.js';
import type { UserIpsRepository } from '@/models/index.js';
import { MetaService } from '@/core/MetaService.js';
@ -34,7 +34,7 @@ const accessDenied = {
@Injectable()
export class ApiCallService implements OnApplicationShutdown {
private logger: Logger;
private userIpHistories: Map<User['id'], Set<string>>;
private userIpHistories: Map<MiUser['id'], Set<string>>;
private userIpHistoriesClearIntervalId: NodeJS.Timer;
constructor(
@ -48,7 +48,7 @@ export class ApiCallService implements OnApplicationShutdown {
private apiLoggerService: ApiLoggerService,
) {
this.logger = this.apiLoggerService.logger;
this.userIpHistories = new Map<User['id'], Set<string>>();
this.userIpHistories = new Map<MiUser['id'], Set<string>>();
this.userIpHistoriesClearIntervalId = setInterval(() => {
this.userIpHistories.clear();
@ -196,7 +196,7 @@ export class ApiCallService implements OnApplicationShutdown {
}
@bindThis
private async logIp(request: FastifyRequest, user: LocalUser) {
private async logIp(request: FastifyRequest, user: MiLocalUser) {
const meta = await this.metaService.fetch();
if (!meta.enableIpLogging) return;
const ip = request.ip;
@ -222,8 +222,8 @@ export class ApiCallService implements OnApplicationShutdown {
@bindThis
private async call(
ep: IEndpoint & { exec: any },
user: LocalUser | null | undefined,
token: AccessToken | null | undefined,
user: MiLocalUser | null | undefined,
token: MiAccessToken | null | undefined,
data: any,
file: {
name: string;