From 88270d2109be67dbd424ec63953fce401da87ee8 Mon Sep 17 00:00:00 2001 From: Sebastian Mahr Date: Thu, 16 Jan 2025 10:17:39 +0100 Subject: [PATCH] Allow `lengthOfGracePeriodInDays` to be set in debug API (#349) * chore: allow lengthOfGracePeriodInDays to be set in debug api * chore: pr comments * chore: pr comments * chore: pr comments --- ...onController.ts => IdentityDeletionProcessController.ts} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename src/modules/coreHttpApi/debug-controllers/{IdentityDeletionController.ts => IdentityDeletionProcessController.ts} (78%) diff --git a/src/modules/coreHttpApi/debug-controllers/IdentityDeletionController.ts b/src/modules/coreHttpApi/debug-controllers/IdentityDeletionProcessController.ts similarity index 78% rename from src/modules/coreHttpApi/debug-controllers/IdentityDeletionController.ts rename to src/modules/coreHttpApi/debug-controllers/IdentityDeletionProcessController.ts index 4a267e4d..280205bc 100644 --- a/src/modules/coreHttpApi/debug-controllers/IdentityDeletionController.ts +++ b/src/modules/coreHttpApi/debug-controllers/IdentityDeletionProcessController.ts @@ -1,6 +1,6 @@ import { TransportServices } from "@nmshd/runtime"; import { Inject } from "@nmshd/typescript-ioc"; -import { Accept, DELETE, GET, Path, POST } from "@nmshd/typescript-rest"; +import { Accept, DELETE, GET, Path, POST, QueryParam } from "@nmshd/typescript-rest"; import { Envelope } from "../../../infrastructure"; import { BaseController } from "../common/BaseController"; @@ -12,8 +12,8 @@ export class IdentityDeletionProcessController extends BaseController { @POST @Accept("application/json") - public async initiateIdentityDeletionProcess(): Promise { - const result = await this.transportServices.identityDeletionProcesses.initiateIdentityDeletionProcess(); + public async initiateIdentityDeletionProcess(@QueryParam("lengthOfGracePeriodInDays") lengthOfGracePeriodInDays?: number): Promise { + const result = await this.transportServices.identityDeletionProcesses.initiateIdentityDeletionProcess({ lengthOfGracePeriodInDays }); return this.ok(result); }