Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
fix(db|tmp): CustomPrismaClient issue
Browse files Browse the repository at this point in the history
Incorrect temptation to import the default client instead of utilizing the provided custom client.
**This solution is temporary!** Until nestjs-prisma new release.

Related Links to the issue:
- notiz-dev/nestjs-prisma#79
  • Loading branch information
Krr0ptioN committed Nov 22, 2023
1 parent 278d1f8 commit 44b7dcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Module } from '@nestjs/common';

import { CustomPrismaModule } from 'nestjs-prisma';
import { CustomPrismaModule } from 'nestjs-prisma/dist/custom';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MusicModule } from '../music/music.module';
Expand All @@ -20,4 +20,4 @@ import { ConfigModule } from '@nestjs/config';
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
export class AppModule { }
4 changes: 2 additions & 2 deletions api/src/music/music.service.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Injectable, Inject } from '@nestjs/common';
import { CustomPrismaService } from 'nestjs-prisma';
import { CustomPrismaService } from 'nestjs-prisma/dist/custom';
import { Prisma, Music, PrismaClient } from '@musica/data-access/client';

@Injectable()
export class MusicService {
constructor(
@Inject('DataAccessService')
private prisma: CustomPrismaService<PrismaClient>
) {}
) { }

create(data: Prisma.MusicCreateInput) {
return this.prisma.client.music.create({ data });
Expand Down

0 comments on commit 44b7dcc

Please sign in to comment.