refactor(backend): integrate CreateNotificationService to NotificationService

This commit is contained in:
syuilo
2023-03-16 14:24:11 +09:00
parent 0944c1cd6f
commit 89e2c302dd
10 changed files with 205 additions and 234 deletions

View File

@@ -3,7 +3,7 @@ import type { UserProfilesRepository, UsersRepository } from '@/models/index.js'
import type { User } from '@/models/entities/User.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { CreateNotificationService } from '@/core/CreateNotificationService.js';
import { NotificationService } from '@/core/NotificationService.js';
export const ACHIEVEMENT_TYPES = [
'notes1',
@@ -90,7 +90,7 @@ export class AchievementService {
@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private createNotificationService: CreateNotificationService,
private notificationService: NotificationService,
) {
}
@@ -114,7 +114,7 @@ export class AchievementService {
}],
});
this.createNotificationService.createNotification(userId, 'achievementEarned', {
this.notificationService.createNotification(userId, 'achievementEarned', {
achievement: type,
});
}