Refactor code structure and dependencies
- Remove unused files and modules - Update submodule URL for epess-database - Update DATABASE_URL in compose.yaml - Update CI workflow to fetch submodules during checkout and fix GITHUB_TOKEN issue - Enable strict mode in tsconfig.json - Add UsersService and UsersResolver in users module - Remove AppService and AppController - Update main.ts to remove unused imports and log statement - Add PrismaModule and PrismaService - Add PrismaContextMiddleware - Update GraphQL module to use schema and PrismaService - Update package.json dependencies and devDependencies
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { Module } from '@nestjs/common';
|
||||
import { PrismaService } from './prisma.service';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [PrismaService],
|
||||
exports: [PrismaService],
|
||||
exports: [PrismaService], // Export PrismaService so other modules can use it
|
||||
})
|
||||
export class PrismaModule {}
|
||||
|
||||
@@ -2,10 +2,7 @@ import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
@Injectable()
|
||||
export class PrismaService
|
||||
extends PrismaClient
|
||||
implements OnModuleInit, OnModuleDestroy
|
||||
{
|
||||
export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
|
||||
async onModuleInit() {
|
||||
await this.$connect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user