chore: update resolvers and service files

This commit is contained in:
ankitsridhar16
2022-12-15 23:31:12 +05:30
parent 9fb9fd4568
commit c87690f378
2 changed files with 75 additions and 40 deletions

View File

@@ -92,6 +92,7 @@ export class UserEnvironmentsResolver {
})
@UseGuards(GqlAuthGuard)
async deleteUserEnvironment(
@GqlUser() user: User,
@Args({
name: 'id',
description: 'ID of the user environment',
@@ -100,7 +101,7 @@ export class UserEnvironmentsResolver {
id: string,
): Promise<UserEnvironment> {
const userEnvironment =
await this.userEnvironmentsService.deleteUserEnvironment(id);
await this.userEnvironmentsService.deleteUserEnvironment(user.uid, id);
if (E.isLeft(userEnvironment)) throwErr(userEnvironment.left);
return userEnvironment.right;
}
@@ -170,7 +171,7 @@ export class UserEnvironmentsResolver {
}
@Subscription(() => UserEnvironment, {
description: 'Listen for User Environment updates',
description: 'Listen for User Environment deletion',
resolve: (value) => value,
})
@UseGuards(GqlAuthGuard)