File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
apps/frontend/src/components/preview
libraries/nestjs-libraries/src/database/prisma Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ import utc from 'dayjs/plugin/utc';
44dayjs . extend ( utc ) ;
55
66export const RenderPreviewDate : FC < { date : string } > = ( { date } ) => {
7+ console . log ( date ) ;
78 return < > { dayjs . utc ( date ) . local ( ) . format ( 'MMMM D, YYYY h:mm A' ) } </ > ;
89} ;
Original file line number Diff line number Diff line change 1- import { Injectable , OnModuleInit } from '@nestjs/common' ;
1+ import { Injectable , OnModuleDestroy , OnModuleInit } from '@nestjs/common' ;
22import { PrismaClient } from '@prisma/client' ;
33
44@Injectable ( )
5- export class PrismaService extends PrismaClient implements OnModuleInit {
5+ export class PrismaService extends PrismaClient implements OnModuleInit , OnModuleDestroy {
66 constructor ( ) {
77 super ( {
88 log : [
@@ -16,6 +16,10 @@ export class PrismaService extends PrismaClient implements OnModuleInit {
1616 async onModuleInit ( ) {
1717 await this . $connect ( ) ;
1818 }
19+
20+ async onModuleDestroy ( ) {
21+ await this . $disconnect ( ) ;
22+ }
1923}
2024
2125@Injectable ( )
@@ -26,7 +30,6 @@ export class PrismaRepository<T extends keyof PrismaService> {
2630 }
2731}
2832
29-
3033@Injectable ( )
3134export class PrismaTransaction {
3235 public model : Pick < PrismaService , '$transaction' > ;
You can’t perform that action at this time.
0 commit comments