refactor(backend): integrate CreateNotificationService to NotificationService
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user