Skip to content

📈 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!

fixed broken funnel update

Blue Mousebb2e0de66c9f
diff --git a/apps/production/src/project/project.controller.ts b/apps/production/src/project/project.controller.ts
index f6cb1dee0..8a78e06c0 100644
--- a/apps/production/src/project/project.controller.ts
+++ b/apps/production/src/project/project.controller.ts
@@ -549,7 +549,7 @@ export class ProjectController {
async updateFunnel(
@Body() funnelDTO: FunnelUpdateDTO,
@CurrentUserId() userId: string,
- ): Promise<any> {
+ ): Promise<void> {
this.logger.log({ funnelDTO, userId }, 'PATCH /project/funnel')
if (!userId) {
@@ -609,7 +609,7 @@ export class ProjectController {
throw new NotFoundException('Funnel not found.')
}
- return this.projectService.updateFunnel({
+ await this.projectService.updateFunnel({
id: funnelDTO.id,
name: funnelDTO.name,
steps: funnelDTO.steps,
diff --git a/apps/production/src/project/project.service.ts b/apps/production/src/project/project.service.ts
index 5a8823a62..097ab761c 100644
--- a/apps/production/src/project/project.service.ts
+++ b/apps/production/src/project/project.service.ts
@@ -827,6 +827,7 @@ export class ProjectService {
id: projectId,
admin: { id: userId },
},
+ relations: ['admin'],
})
}