Merge for alpha 0.0.6 #61

Merged
niggl merged 39 commits from dev into main 2020-12-30 17:58:27 +00:00
Showing only changes of commit c4270b0839 - Show all commits

View File

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