add GET Enppoint

This commit is contained in:
Andreas Knuth 2025-02-21 13:08:38 -06:00
parent d29260a919
commit 4d992fdae5
1 changed files with 5 additions and 2 deletions

View File

@ -1,11 +1,14 @@
import { Body, Controller, Post } from '@nestjs/common';
import { Body, Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get()
getTest() {
return { message: 'API is alive' };
}
@Post()
async sendEMail(@Body() mailInfo: {name:string,email:string,message:string}): Promise<void> {
return await this.appService.sendMail(mailInfo);