production-evyos-systems-an.../ServicesApi/src/accounts/accounts.service.ts

40 lines
1.0 KiB
TypeScript

import { Injectable } from '@nestjs/common';
import { SuperUsersService } from './superusers/superusers.service';
import { EventsService } from '../navigator/events/events.service';
@Injectable()
export class AccountsService {
mapper: any
constructor(
private superUsersService: SuperUsersService,
private eventService: EventsService,
) {
this.mapper = {
"j0adQOsJBR0xq24dxLKdDU9EQRmt4gzE05CmhA": this.superUsersService,
}
}
async onModuleInit() {
Object.entries(this.mapper).map(async ([key, value]) => {
const service = value as any
await this.eventService.setEvents(service.events, "AccountsService")
})
// const accountPages = await fetch(
// "http://localhost:3000/pages",
// {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// },
// body: JSON.stringify({
// token: 'j0adQOsJBR0xq24dxLKdDU9EQRmt4gzE05CmhA',
// pages: {
// }
// })
// }
// )
}
}