diff --git a/libs/prisma/src/processes/prisma.process.ts b/libs/prisma/src/processes/prisma.process.ts index 639766d..f943b35 100644 --- a/libs/prisma/src/processes/prisma.process.ts +++ b/libs/prisma/src/processes/prisma.process.ts @@ -1,12 +1,14 @@ import { DefaultProcess } from '@aditama-labs/nest-autocrud/skeleton'; import { Inject, Injectable } from '@nestjs/common'; import { PRISMA_DELEGATE } from '../constants'; +import { PrismaService } from '../prisma.service'; @Injectable() export class PrismaProcess extends DefaultProcess { constructor( @Inject(PRISMA_DELEGATE) private delegate, + public prisma: PrismaService, ) { super(); } diff --git a/package-lock.json b/package-lock.json index 5722913..753df9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aditama-labs/nest-autocrud", - "version": "0.1.4", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@aditama-labs/nest-autocrud", - "version": "0.1.4", + "version": "0.3.0", "license": "MIT", "dependencies": { "@nestjs/common": "^10.0.0", diff --git a/src/example/custom/domain/custom.read.process.ts b/src/example/custom/domain/custom.read.process.ts index c22bd9f..5dcf0da 100644 --- a/src/example/custom/domain/custom.read.process.ts +++ b/src/example/custom/domain/custom.read.process.ts @@ -1,21 +1,10 @@ import { - PRISMA_DELEGATE, - PrismaReadProcess, - PrismaService, + PrismaReadProcess } from '@aditama-labs/nest-autocrud/prisma'; -import { Inject, Injectable } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; @Injectable() export class CustomReadProcess extends PrismaReadProcess { - constructor( - @Inject(PRISMA_DELEGATE) - delegate, - @Inject() - private prisma: PrismaService, - ) { - super(delegate); - } - customResult; async before(): Promise {