📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
added mock DELETE /share/:shareId
Blue Mouseebf18a5bd2a4
diff --git a/src/user/user.controller.ts b/src/user/user.controller.tsindex 0a985cd6b..6dff23116 100644--- a/src/user/user.controller.ts+++ b/src/user/user.controller.ts@@ -165,6 +165,29 @@ export class UserController {}}+ @Delete('/share/:shareId')+ @HttpCode(204)+ @UseGuards(SelfhostedGuard)+ @UseGuards(RolesGuard)+ @Roles(UserType.CUSTOMER, UserType.ADMIN)+ async deleteShare(+ @Param('shareId') shareId: string,+ @CurrentUserId() uid: string,+ ): Promise<any> {+ this.logger.log({ uid, shareId }, 'DELETE /share/:shareId')++ const share = await this.projectService.findShare({+ where: {+ id: shareId,+ },+ relations: ['project'],+ })++ // Todo:+ // 1. Validate if uid can access this share+ // 2. Delete share+ }+@Post('/confirm_email')@UseGuards(RolesGuard)@UseGuards(SelfhostedGuard)