Listory/src/users/users.module.ts
Julian Tölle 46b1650066 feat(api): import listens after first sign in
Previously it took a minute until the import was started within the normal
loop. This way, we create an import job right after the user logs
in for the first time.
2023-03-12 02:20:39 +01:00

18 lines
648 B
TypeScript

import { PGBossModule } from "@apricote/nest-pg-boss";
import { Module } from "@nestjs/common";
import { TypeOrmRepositoryModule } from "../database/entity-repository/typeorm-repository.module";
import { ImportSpotifyJob } from "../sources/jobs";
import { UserRepository } from "./user.repository";
import { UsersController } from "./users.controller";
import { UsersService } from "./users.service";
@Module({
imports: [
TypeOrmRepositoryModule.for([UserRepository]),
PGBossModule.forJobs([ImportSpotifyJob]),
],
providers: [UsersService],
exports: [UsersService],
controllers: [UsersController],
})
export class UsersModule {}