Merge pull request #272 from Tria-plc/alpha

Alpha
This commit is contained in:
Abubeker Yasin
2026-06-24 15:05:24 +03:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import {
Role,
RolePermission,
} from '@tria-plc/iamapi-common';
import { InjectDataSource } from '@nestjs/typeorm';
import { DataSource, EntityManager, In } from 'typeorm';
import { ERoleKey } from '@tria-plc/api-common/utils/enums/seed.enum';
import {
@@ -25,7 +26,7 @@ type SeedOrganization = { id: string; key: string };
export class EdrPassengerOrgSeeder {
private readonly logger = new Logger(EdrPassengerOrgSeeder.name);
constructor(private readonly dataSource: DataSource) {}
constructor(@InjectDataSource() private readonly dataSource: DataSource) {}
async run() {
if (process.env[SEED_FLAG]?.trim().toLowerCase() !== 'true') {

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') {