added pages tested via backend
This commit is contained in:
@@ -37,7 +37,5 @@ export class AccountsController {
|
||||
@Post('filter')
|
||||
@HttpCode(200)
|
||||
@UseGuards(AuthControlGuard, EndpointControlGuard)
|
||||
async filterAccounts(@Body() query: any, @Req() req: any) {
|
||||
return await this.navigator.getFunction(req, this.accountsService.mapper, query)
|
||||
}
|
||||
async filterAccounts(@Body() query: any, @Req() req: any) { return await this.navigator.getFunction(req, this.accountsService.mapper, query) }
|
||||
}
|
||||
|
||||
@@ -12,9 +12,10 @@ import {
|
||||
import { SuperUsersService } from './superusers/superusers.service';
|
||||
import { UrlHandler } from '../utils/navigator/urlHandler';
|
||||
import { Navigator } from '@/src/utils/navigator/navigator';
|
||||
import { NavigatorModule } from '../navigator/navigator.module';
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule, UtilsModule, RedisModule],
|
||||
imports: [PrismaModule, UtilsModule, RedisModule, NavigatorModule],
|
||||
providers: [
|
||||
AccountsService,
|
||||
AuthControlGuard,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { SuperUsersService } from './superusers/superusers.service';
|
||||
import { EventsService } from '../navigator/events/events.service';
|
||||
|
||||
@Injectable()
|
||||
export class AccountsService {
|
||||
@@ -7,9 +8,32 @@ export class AccountsService {
|
||||
|
||||
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: {
|
||||
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user