mirror of
https://github.com/aditama-labs/nest-autocrud.git
synced 2024-11-24 12:56:22 +00:00
feat: add service to all prisma process
This commit is contained in:
parent
55fe243e00
commit
d25afafbd3
@ -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();
|
||||
}
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -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",
|
||||
|
@ -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<any> {
|
||||
|
Loading…
Reference in New Issue
Block a user