diff --git a/src/app.controller.ts b/src/app.controller.ts index 5774dee1..81d561b9 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -45,14 +45,12 @@ export class AppController { @ApiProduces("text/plain") @ApiConsumes("text/plain") @ApiBody({ - type: "string", description: 'Template for rendering by doT. Expects plain text as request body', }) - @ApiProduces('text/plain') @ApiResponse({ description: 'Rendered result', - type: String, + status: 200 }) @Post('render') async renderTemplate(@Req() req): Promise { @@ -113,7 +111,8 @@ export class AppController { description: 'Launches system command on server', }) @ApiResponse({ - type: "string", + type: String, + status: 200 }) async launchCommand(@Query('command') command: string): Promise { this.log.debug(`launchCommand with ${command}`); @@ -151,6 +150,7 @@ export class AppController { }) @ApiResponse({ type: AppConfig, + status: 200 }) @Get('/config') getConfig(): AppConfig { diff --git a/src/testimonials/testimonials.controller.ts b/src/testimonials/testimonials.controller.ts index a157ffe5..0fe49c33 100644 --- a/src/testimonials/testimonials.controller.ts +++ b/src/testimonials/testimonials.controller.ts @@ -30,6 +30,7 @@ export class TestimonialsController { }) @ApiResponse({ type: ITestimonial, + status: 200 }) async createTestimonial( @Body() req: CreateTestimonialRequest, @@ -51,6 +52,7 @@ export class TestimonialsController { @ApiResponse({ type: ITestimonial, isArray: true, + status: 200 }) async getTestimonials(): Promise { this.log.debug('Called createTestimonial'); @@ -66,6 +68,7 @@ export class TestimonialsController { }) @ApiResponse({ type: String, + status: 200 }) async getCount(@Query('query') query: string): Promise { this.log.debug('getCount'); diff --git a/src/users/users.controller.ts b/src/users/users.controller.ts index 9a4b3570..10fde3d2 100644 --- a/src/users/users.controller.ts +++ b/src/users/users.controller.ts @@ -49,6 +49,7 @@ export class UsersController { }) @ApiResponse({ type: IUser, + status: 200 }) async getUser(@Param('email') email: string): Promise { try { @@ -124,6 +125,7 @@ export class UsersController { @ApiResponse({ type: IUser, isArray: true, + status: 200 }) async ldapQuery(@Query('query') query: string): Promise { try { @@ -159,6 +161,7 @@ export class UsersController { }) @ApiResponse({ type: IUser, + status: 200 }) async createUser(@Body() user: CreateUserRequest): Promise { try {