fix(push): fix TypeScript Map type inference error in OfflinePushService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bc48be1c95
commit
978c534a7e
|
|
@ -35,7 +35,7 @@ export interface NotificationForPush {
|
|||
@Injectable()
|
||||
export class OfflinePushService implements OnModuleInit {
|
||||
private readonly logger = new Logger(OfflinePushService.name);
|
||||
private readonly providers: Map<string, PushProvider>;
|
||||
private readonly providers: Map<string, PushProvider> = new Map();
|
||||
|
||||
constructor(
|
||||
private readonly tokenRepo: DevicePushTokenRepository,
|
||||
|
|
@ -45,13 +45,11 @@ export class OfflinePushService implements OnModuleInit {
|
|||
private readonly oppo: OppoProvider,
|
||||
private readonly vivo: VivoProvider,
|
||||
) {
|
||||
this.providers = new Map([
|
||||
['FCM', fcm],
|
||||
['HMS', hms],
|
||||
['MI', xiaomi],
|
||||
['OPPO', oppo],
|
||||
['VIVO', vivo],
|
||||
]);
|
||||
this.providers.set('FCM', fcm);
|
||||
this.providers.set('HMS', hms);
|
||||
this.providers.set('MI', xiaomi);
|
||||
this.providers.set('OPPO', oppo);
|
||||
this.providers.set('VIVO', vivo);
|
||||
}
|
||||
|
||||
onModuleInit(): void {
|
||||
|
|
|
|||
Loading…
Reference in New Issue