1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-17 12:50:13 +01:00
pingvin-share/backend/src/config/config.module.ts

26 lines
700 B
TypeScript
Raw Normal View History

import { Global, Module } from "@nestjs/common";
import { EmailModule } from "src/email/email.module";
import { PrismaService } from "src/prisma/prisma.service";
import { ConfigController } from "./config.controller";
import { ConfigService } from "./config.service";
import { LogoService } from "./logo.service";
@Global()
@Module({
imports: [EmailModule],
providers: [
{
provide: "CONFIG_VARIABLES",
useFactory: async (prisma: PrismaService) => {
return await prisma.config.findMany();
},
inject: [PrismaService],
},
ConfigService,
LogoService,
],
controllers: [ConfigController],
exports: [ConfigService],
})
export class ConfigModule {}