Skip to content

Commit

Permalink
feat: medical endpoints
Browse files Browse the repository at this point in the history
harshalranjhani committed Jul 11, 2024
1 parent 88fbf80 commit fb8ce12
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/medical/medical.service.ts
Original file line number Diff line number Diff line change
@@ -24,15 +24,23 @@ export class MedicalService {
}

findAll() {
return `This action returns all medical`;
return this.prismaService.medicalQuery.findMany();
}

findOne(id: number) {
return `This action returns a #${id} medical`;
return this.prismaService.medicalQuery.findUnique({
where: {
id: id
}
});
}


remove(id: number) {
return `This action removes a #${id} medical`;
return this.prismaService.medicalQuery.delete({
where: {
id: id
}
});
}
}

0 comments on commit fb8ce12

Please sign in to comment.