From 5a003945ac7d1a8d446c1bcc8007523b675ab6f5 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 21 Jan 2021 19:34:27 +0100 Subject: [PATCH] Updated response schema error to a more fitting one ref #112 --- src/controllers/RunnerSelfServiceController.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/RunnerSelfServiceController.ts b/src/controllers/RunnerSelfServiceController.ts index 57adc79..71ecd53 100644 --- a/src/controllers/RunnerSelfServiceController.ts +++ b/src/controllers/RunnerSelfServiceController.ts @@ -5,7 +5,6 @@ import { getConnectionManager, Repository } from 'typeorm'; import { config } from '../config'; import { InvalidCredentialsError, JwtNotProvidedError } from '../errors/AuthError'; import { RunnerEmailNeededError, RunnerNotFoundError } from '../errors/RunnerErrors'; -import { RunnerGroupNotFoundError } from '../errors/RunnerGroupErrors'; import { RunnerOrganisationNotFoundError } from '../errors/RunnerOrganisationErrors'; import { JwtCreator } from '../jwtcreator'; import { CreateSelfServiceCitizenRunner } from '../models/actions/create/CreateSelfServiceCitizenRunner'; @@ -53,7 +52,7 @@ export class RunnerSelfServiceController { @Post('/register/:token') @ResponseSchema(ResponseSelfServiceRunner) - @ResponseSchema(RunnerGroupNotFoundError, { statusCode: 404 }) + @ResponseSchema(RunnerOrganisationNotFoundError, { statusCode: 404 }) @OpenAPI({ description: 'Create a new selfservice runner in a provided org.
The orgs get provided and authorized via api tokens that can be optained via the /organisations endpoint.' }) async registerOrganisationRunner(@Param('token') token: string, @Body({ validate: true }) createRunner: CreateSelfServiceRunner) { const org = await this.getOrgansisation(token);