Adapted the new async behaviour

ref #56
This commit is contained in:
Nicolai Ort 2020-12-29 20:21:45 +01:00
parent bb24ed53a4
commit c4270b0839
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { Authorized, Body, Delete, Get, JsonController, OnUndefined, Param, Post } from 'routing-controllers';
import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi';
import { getConnectionManager, Repository } from 'typeorm';
import { StatsClientNotFoundError } from '../errors/StatsClientErrors';
import { StatsClientIdsNotMatchingError, StatsClientNotFoundError } from '../errors/StatsClientErrors';
import { TrackNotFoundError } from "../errors/TrackErrors";
import { CreateStatsClient } from '../models/actions/CreateStatsClient';
import { StatsClient } from '../models/entities/StatsClient';
@ -53,7 +53,7 @@ export class StatsClientController {
@Body({ validate: true })
client: CreateStatsClient
) {
let newClient = await this.clientRepository.save(client.toStatsClient());
let newClient = await this.clientRepository.save(await client.toStatsClient());
let responseClient = new ResponseStatsClient(newClient);
responseClient.key = newClient.key;
return responseClient;