diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-16 10:45:22 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-16 10:45:22 +0900 |
| commit | 1fa1d316969de15d6aaef1dbf0a0b95aec30e377 (patch) | |
| tree | bacefb9f8dbc2cc18d8c775cdd0572263b4e11ef /packages/backend/src/core/UserMutingService.ts | |
| parent | Update CHANGELOG.md (diff) | |
| download | sharkey-1fa1d316969de15d6aaef1dbf0a0b95aec30e377.tar.gz sharkey-1fa1d316969de15d6aaef1dbf0a0b95aec30e377.tar.bz2 sharkey-1fa1d316969de15d6aaef1dbf0a0b95aec30e377.zip | |
perf(backend): createdAtをidから取得するように & 無駄なDateインスタンスの生成を避けるように
Diffstat (limited to 'packages/backend/src/core/UserMutingService.ts')
| -rw-r--r-- | packages/backend/src/core/UserMutingService.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/backend/src/core/UserMutingService.ts b/packages/backend/src/core/UserMutingService.ts index 2387c9d648..397e6bdd5d 100644 --- a/packages/backend/src/core/UserMutingService.ts +++ b/packages/backend/src/core/UserMutingService.ts @@ -26,8 +26,7 @@ export class UserMutingService { @bindThis public async mute(user: MiUser, target: MiUser, expiresAt: Date | null = null): Promise<void> { await this.mutingsRepository.insert({ - id: this.idService.genId(), - createdAt: new Date(), + id: this.idService.gen(), expiresAt: expiresAt ?? null, muterId: user.id, muteeId: target.id, |