Added success response

This commit is contained in:
Nicolai Ort 2021-03-02 17:20:08 +01:00
parent f8b9b188ae
commit 895e346e59
1 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import { IsString } from 'class-validator';
import { Authorized, JsonController, Post, QueryParam } from 'routing-controllers';
import { OpenAPI } from 'routing-controllers-openapi';
import { Mailer } from '../Mailer';
@ -24,7 +25,7 @@ export class MailController {
} catch (error) {
throw error;
}
return;
return new SuccessResponse();
}
@Post('/test')
@ -40,6 +41,18 @@ export class MailController {
console.log(error)
throw error;
}
return;
return new SuccessResponse();
}
}
/**
* Simple success response class to make everyone happy :)
*/
export class SuccessResponse {
@IsString()
success: boolean = true;
@IsString()
message: "Sent!"
}