104 switch to daisyui (#106)

* adding daisyui

* adding daisy ui

* switching to daisy ui

* switching to daisy ui

* adding daisy ui

* adding daisy ui
This commit was merged in pull request #106.
This commit is contained in:
2025-12-29 19:43:27 -06:00
committed by GitHub
parent 64c94ca9f4
commit f041e0e1ba
41 changed files with 1024 additions and 4286 deletions

View File

@@ -32,17 +32,18 @@ import { join } from 'path';
}),
HealthModule,
LogModule,
// MsGraphModule.registerAsync({
// inject: [ConfigService],
// imports: [ConfigModule],
// useFactory: async (configService: ConfigService) => {
// return {
// clientId: configService.get<string>('clientId'),
// clientSecret: configService.get<string>('clientSecret'),
// tenantId: configService.get<string>('tenantId')
// }
// }
// }),
MsGraphModule.registerAsync({
inject: [ConfigService],
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => {
return {
authority: configService.get<string>('authority'),
clientId: configService.get<string>('clientId'),
clientSecret: configService.get<string>('clientSecret'),
tenantId: configService.get<string>('tenantId')
}
}
}),
PilotModule,
ServeStaticModule.forRoot({
rootPath: join(__dirname, '../..', 'client', 'dist')

View File

@@ -1,6 +1,7 @@
export default () => ({
azureStorageConnectionString: process.env.AZURE_STORAGE_CONNECTION_STRING,
audience: process.env.AUDIENCE,
authority: process.env.AUTHORITY,
clientId: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
issuer: process.env.ISSUER_URL,

View File

@@ -65,7 +65,7 @@ export class LogController {
return await this.logService.create(logDto);
} catch (error) {
const customError = error as CustomError;
console.log(error)
throw new HttpException(customError.message, customError.statusCode);
}
}

View File

@@ -10,15 +10,15 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors({
origin: 'http://localhost:8080', // Allow requests from your frontend's origin
origin: 'http://localhost:8080',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true, // If you need to send cookies or authorization headers
credentials: true,
});
app.setGlobalPrefix('api');
app.useGlobalFilters(new HttpExceptionFilter());
app.use(
session({
secret: 'blah',
secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false
})

View File

@@ -29,6 +29,7 @@ export class PilotInterceptor implements NestInterceptor {
if (req.headers.authorization) {
const authHeader = req.headers.authorization;
const token = authHeader && authHeader.split(' ')[1];
const jwtPayload = jwtDecode(token);
const rolesKeyName = Object.keys(jwtPayload).find((key) => key.includes('roles'));