fix: ( seed ) add @InjectDataSource() to PassengerStaffUsersSeeder constructor

This commit is contained in:
Abubeker Yasin
2026-06-24 15:03:48 +03:00
parent cae90919f2
commit e2e10e0a44
2 changed files with 4 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import {
UserCredential,
UserRole,
} from '@tria-plc/iamapi-common';
import { InjectDataSource } from '@nestjs/typeorm';
import { DataSource } from 'typeorm';
const SEED_FLAG = 'SEED_PASSENGER_STAFF';
@@ -25,7 +26,7 @@ const STAFF_USERS = [
export class PassengerStaffUsersSeeder {
private readonly logger = new Logger(PassengerStaffUsersSeeder.name);
constructor(private readonly dataSource: DataSource) {}
constructor(@InjectDataSource() private readonly dataSource: DataSource) {}
async run() {
if (process.env[SEED_FLAG]?.trim().toLowerCase() !== 'true') {