From db90f7037871b0a7ef6668bd708d710126195eaa Mon Sep 17 00:00:00 2001 From: Vivian Plasencia Date: Fri, 29 Mar 2024 20:50:15 +0100 Subject: [PATCH] fix: enable access to some group endpoints Remove @UseGuards(AuthGuard) to enable access to some group endpoints from outside the dashboard. --- apps/api/src/app/groups/groups.controller.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/api/src/app/groups/groups.controller.ts b/apps/api/src/app/groups/groups.controller.ts index 0148913..f2bad74 100644 --- a/apps/api/src/app/groups/groups.controller.ts +++ b/apps/api/src/app/groups/groups.controller.ts @@ -9,8 +9,7 @@ import { Patch, Post, Query, - Req, - UseGuards + Req } from "@nestjs/common" import { ApiBody, @@ -21,7 +20,6 @@ import { ApiTags } from "@nestjs/swagger" import { Request } from "express" -import { AuthGuard } from "../auth/auth.guard" import { stringifyJSON } from "../utils" import { Group, MerkleProof } from "./docSchemas" import { AddMemberDto } from "./dto/add-member.dto" @@ -62,7 +60,6 @@ export class GroupsController { } @Post() - @UseGuards(AuthGuard) @ApiBody({ required: false, type: Array }) @ApiHeader({ name: "x-api-key", required: false }) @ApiCreatedResponse({ type: Group }) @@ -105,7 +102,6 @@ export class GroupsController { } @Delete() - @UseGuards(AuthGuard) @ApiBody({ required: false, type: Array }) @ApiHeader({ name: "x-api-key", required: false }) @ApiOperation({ @@ -131,7 +127,6 @@ export class GroupsController { } @Delete(":group") - @UseGuards(AuthGuard) @ApiHeader({ name: "x-api-key", required: false }) @ApiOperation({ description: "Remove a specific group using an API Key or manually" @@ -156,7 +151,6 @@ export class GroupsController { } @Patch() - @UseGuards(AuthGuard) @ApiBody({ required: false, type: Array }) @ApiCreatedResponse({ type: Array }) @ApiHeader({ name: "x-api-key", required: false }) @@ -202,7 +196,6 @@ export class GroupsController { } @Patch(":group") - @UseGuards(AuthGuard) @ApiHeader({ name: "x-api-key", required: false }) @ApiBody({ required: false, type: UpdateGroupDto }) @ApiCreatedResponse({ type: Group })