feat: v2 routing forms responses endpoints (#19319)
* wip: routing forms responses * refactor structure * Revert "refactor structure" This reverts commit b641c06592cd9314008e81c4584039bd42393ac7. * routing forms * remove unused file
This commit is contained in:
1 parent
0b3aa4fd34
commit
e6daed762b
19 files changed
+714
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { PrismaModule } from "@/modules/prisma/prisma.module";
|
||||
import { RoutingFormsRepository } from "@/modules/routing-forms/routing-forms.repository";
|
||||
import { Module } from "@nestjs/common";
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
providers: [RoutingFormsRepository],
|
||||
exports: [RoutingFormsRepository],
|
||||
})
|
||||
export class RoutingFormsModule {}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
|
||||
import { Injectable } from "@nestjs/common";
|
||||
|
||||
@Injectable()
|
||||
export class RoutingFormsRepository {
|
||||
constructor(private readonly dbRead: PrismaReadService) {}
|
||||
|
||||
async getTeamRoutingForm(teamId: number, routingFormId: string) {
|
||||
return this.dbRead.prisma.app_RoutingForms_Form.findFirst({
|
||||
where: {
|
||||
id: routingFormId,
|
||||
teamId,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user