add GET Enppoint
This commit is contained in:
parent
d29260a919
commit
4d992fdae5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue