From bca979bab5a092d0e266f96b5eca54525d53b0c7 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sun, 10 Jan 2021 17:16:42 +0100 Subject: [PATCH] Unified remove parameters ref #76 --- src/controllers/StatsClientController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/StatsClientController.ts b/src/controllers/StatsClientController.ts index d7724c3..4716909 100644 --- a/src/controllers/StatsClientController.ts +++ b/src/controllers/StatsClientController.ts @@ -1,4 +1,4 @@ -import { Authorized, Body, Delete, Get, JsonController, OnUndefined, Param, Post } from 'routing-controllers'; +import { Authorized, Body, Delete, Get, JsonController, OnUndefined, Param, Post, QueryParam } from 'routing-controllers'; import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi'; import { getConnectionManager, Repository } from 'typeorm'; import { StatsClientNotFoundError } from '../errors/StatsClientErrors'; @@ -65,7 +65,7 @@ export class StatsClientController { @ResponseSchema(ResponseEmpty, { statusCode: 204 }) @OnUndefined(204) @OpenAPI({ description: "Delete the stats client whose id you provided.
If no client with this id exists it will just return 204(no content)." }) - async remove(@Param("id") id: number) { + async remove(@Param("id") id: number, @QueryParam("force") force: boolean) { let client = await this.clientRepository.findOne({ id: id }); if (!client) { return null; }