fix(api): add SkipCsrf to queue notification ack endpoint
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { Controller, Get, Param, Post, Res, UseGuards } from "@nestjs/common";
|
import { Controller, Get, Param, Post, Res, UseGuards } from "@nestjs/common";
|
||||||
import type { Response } from "express";
|
import type { Response } from "express";
|
||||||
|
import { SkipCsrf } from "../common/decorators/skip-csrf.decorator";
|
||||||
import { ApiKeyGuard } from "../common/guards/api-key.guard";
|
import { ApiKeyGuard } from "../common/guards/api-key.guard";
|
||||||
import {
|
import {
|
||||||
QueueNotificationsService,
|
QueueNotificationsService,
|
||||||
@@ -22,6 +23,7 @@ export class QueueNotificationsController {
|
|||||||
await this.queueNotificationsService.streamNotifications(res);
|
await this.queueNotificationsService.streamNotifications(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SkipCsrf()
|
||||||
@Post("notifications/:id/ack")
|
@Post("notifications/:id/ack")
|
||||||
async ackNotification(@Param("id") id: string): Promise<{ success: true; id: string }> {
|
async ackNotification(@Param("id") id: string): Promise<{ success: true; id: string }> {
|
||||||
return this.queueNotificationsService.ackNotification(id);
|
return this.queueNotificationsService.ackNotification(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user