Added success response
This commit is contained in:
parent
f8b9b188ae
commit
895e346e59
|
@ -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!"
|
||||
}
|
Loading…
Reference in New Issue