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

This commit is contained in:
Balu Babu
2023-09-21 12:06:55 +05:30
parent f5db54484c
commit 07c841796a
2 changed files with 2 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ services:
build:
dockerfile: packages/hoppscotch-backend/Dockerfile
context: .
target: prod
target: dev
env_file:
- ./.env
restart: always

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({