parent
e4fafd764c
commit
bca979bab5
@ -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 { OpenAPI, ResponseSchema } from 'routing-controllers-openapi';
|
||||||
import { getConnectionManager, Repository } from 'typeorm';
|
import { getConnectionManager, Repository } from 'typeorm';
|
||||||
import { StatsClientNotFoundError } from '../errors/StatsClientErrors';
|
import { StatsClientNotFoundError } from '../errors/StatsClientErrors';
|
||||||
@ -65,7 +65,7 @@ export class StatsClientController {
|
|||||||
@ResponseSchema(ResponseEmpty, { statusCode: 204 })
|
@ResponseSchema(ResponseEmpty, { statusCode: 204 })
|
||||||
@OnUndefined(204)
|
@OnUndefined(204)
|
||||||
@OpenAPI({ description: "Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content)." })
|
@OpenAPI({ description: "Delete the stats client whose id you provided. <br> 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 });
|
let client = await this.clientRepository.findOne({ id: id });
|
||||||
if (!client) { return null; }
|
if (!client) { return null; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user