From da7af92dcbbae9444ce9daf3fd278212d9cea4c7 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Wed, 9 Aug 2023 03:17:29 +0530 Subject: initial commit with sample post url --- src/app.controller.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/app.controller.ts (limited to 'src/app.controller.ts') diff --git a/src/app.controller.ts b/src/app.controller.ts new file mode 100644 index 0000000..3e9bcca --- /dev/null +++ b/src/app.controller.ts @@ -0,0 +1,20 @@ +import { Body, Controller, Get, Post } from '@nestjs/common'; +import { AppService } from './app.service'; + +@Controller() +export class AppController { + constructor(private readonly appService: AppService) {} + + @Get() + getHello(): Object { + return this.appService.getHello(); + } + + @Post() + saveJournalData(@Body() journalData: any) { + console.log("JOURNAL DATA", journalData); + return { + success: "ok" + } + } +} -- cgit v1.2.3