BugFixes bzgl. Observables, Logging Anpassungen, Endpunkt hardening, dotenv-flow usage
This commit is contained in:
@@ -7,19 +7,19 @@ import { MailService } from './mail.service';
|
||||
export class MailController {
|
||||
constructor(private mailService: MailService) {}
|
||||
@Post()
|
||||
sendEMail(@Body() mailInfo: MailInfo): Promise<void | ErrorResponse> {
|
||||
async sendEMail(@Body() mailInfo: MailInfo): Promise<void | ErrorResponse> {
|
||||
if (mailInfo.listing) {
|
||||
return this.mailService.sendInquiry(mailInfo);
|
||||
return await this.mailService.sendInquiry(mailInfo);
|
||||
} else {
|
||||
return this.mailService.sendRequest(mailInfo);
|
||||
return await this.mailService.sendRequest(mailInfo);
|
||||
}
|
||||
}
|
||||
@Post('subscriptionConfirmation')
|
||||
sendSubscriptionConfirmation(@Body() user: User): Promise<void | ErrorResponse> {
|
||||
return this.mailService.sendSubscriptionConfirmation(user);
|
||||
async sendSubscriptionConfirmation(@Body() user: User): Promise<void | ErrorResponse> {
|
||||
return await this.mailService.sendSubscriptionConfirmation(user);
|
||||
}
|
||||
@Post('send2Friend')
|
||||
send2Friend(@Body() shareByEMail: ShareByEMail): Promise<void | ErrorResponse> {
|
||||
return this.mailService.send2Friend(shareByEMail);
|
||||
async send2Friend(@Body() shareByEMail: ShareByEMail): Promise<void | ErrorResponse> {
|
||||
return await this.mailService.send2Friend(shareByEMail);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user