MCPcopy Create free account
hub / github.com/bsoc-bitbyte/busify / getContractorById

Method getContractorById

backend/src/Bus/bus.service.ts:52–62  ·  view source on GitHub ↗
(contractorId: string)

Source from the content-addressed store, hash-verified

50 return this.prismaService.contractor.findMany({});
51 }
52 async getContractorById(contractorId: string) {
53 const contractor = await this.prismaService.contractor.findFirst({
54 where: {
55 id: contractorId,
56 },
57 });
58 if (!contractor) {
59 throw new HttpException('Conductor not found', 404);
60 }
61 return contractor;
62 }
63 async createContractor(contractor: any) {
64 return this.prismaService.contractor.create({
65 data: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected