fix:(freight:auth): finished integrating the freight api with the freight portal

This commit is contained in:
Michael Abebe
2026-05-18 11:07:09 +03:00
parent b46a7765e8
commit 2940d20e06
3 changed files with 29 additions and 4 deletions

View File

@@ -14,6 +14,9 @@ JWT_SECRET=
JWT_ACCESS_TOKEN_SECRET=
JWT_REFRESH_TOKEN_SECRET=
JWT_EXPIRES_IN=3600
# JWT expiry for @tria-plc/api-common token utils (jsonwebtoken timespan format)
JWT_ACCESS_TOKEN_EXPIRES=1h
JWT_REFRESH_TOKEN_EXPIRES=7d
# IAM seed defaults (used by @tria-plc/iamapi-common on first boot)
SUPER_ADMIN_EMAIL=superadmin@tria.com

View File

@@ -1,7 +1,7 @@
import { Module } from "@nestjs/common";
import { Module, OnApplicationBootstrap } from "@nestjs/common";
import { ConfigModule, ConfigService } from "@nestjs/config";
import { TypeOrmModule, TypeOrmModuleOptions } from "@nestjs/typeorm";
import { IamModule } from "@tria-plc/iamapi-common";
import { IamModule, DataSeeder } from "@tria-plc/iamapi-common";
import { SharedAuthModule } from "@tria-plc/api-common/modules/auth/shared-auth.module";
import appConfig from "./config/app.config";
@@ -27,7 +27,7 @@ import { NotificationsModule } from "./modules/notifications/notifications.modul
config.get<TypeOrmModuleOptions>("database")!,
}),
SharedAuthModule,
IamModule,
IamModule.forRoot(),
BookingsModule,
ConsignmentsModule,
TrainsModule,
@@ -37,4 +37,10 @@ import { NotificationsModule } from "./modules/notifications/notifications.modul
NotificationsModule,
],
})
export class AppModule {}
export class AppModule implements OnApplicationBootstrap {
constructor(private readonly seeder: DataSeeder) {}
async onApplicationBootstrap() {
await this.seeder.run();
}
}