refactor
This commit is contained in:
parent
30f600e03e
commit
1b21bad202
33 changed files with 146 additions and 146 deletions
|
@ -5,7 +5,7 @@ import { promisify } from 'node:util';
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { getIpHash } from '@/misc/get-ip-hash.js';
|
||||
import type { ILocalUser, User } from '@/models/entities/User.js';
|
||||
import type { LocalUser, User } from '@/models/entities/User.js';
|
||||
import type { AccessToken } from '@/models/entities/AccessToken.js';
|
||||
import type Logger from '@/logger.js';
|
||||
import type { UserIpsRepository } from '@/models/index.js';
|
||||
|
@ -168,7 +168,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
private async logIp(request: FastifyRequest, user: ILocalUser) {
|
||||
private async logIp(request: FastifyRequest, user: LocalUser) {
|
||||
const meta = await this.metaService.fetch();
|
||||
if (!meta.enableIpLogging) return;
|
||||
const ip = request.ip;
|
||||
|
@ -194,7 +194,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||
@bindThis
|
||||
private async call(
|
||||
ep: IEndpoint & { exec: any },
|
||||
user: ILocalUser | null | undefined,
|
||||
user: LocalUser | null | undefined,
|
||||
token: AccessToken | null | undefined,
|
||||
data: any,
|
||||
file: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue