refactor: removed all instances of rejectOnNotFound in prisma queries (#3377)

* chore: removed rejectOnNotFound property from prisma query in team-enviroment method

* chore: fixed issues with test cases in team-environment module

* chore: changed target of hoppscotch-old-backend service back to prod
This commit is contained in:
Balu Babu
2023-10-16 14:04:03 +05:30
committed by GitHub
parent f5db54484c
commit 46caf9b198
2 changed files with 6 additions and 5 deletions

View File

@@ -183,11 +183,10 @@ export class TeamEnvironmentsService {
*/
async createDuplicateEnvironment(id: string) {
try {
const environment = await this.prisma.teamEnvironment.findFirst({
const environment = await this.prisma.teamEnvironment.findFirstOrThrow({
where: {
id: id,
},
rejectOnNotFound: true,
});
const result = await this.prisma.teamEnvironment.create({