From 4ae4e874689a71e33cdd7a5799fc0c85c4861367 Mon Sep 17 00:00:00 2001 From: Joseph Ditton Date: Mon, 22 Nov 2021 14:21:53 -0700 Subject: adds start for console --- server/app.controller.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/app.controller.ts') diff --git a/server/app.controller.ts b/server/app.controller.ts index a6bcf58..685cf8f 100644 --- a/server/app.controller.ts +++ b/server/app.controller.ts @@ -1,8 +1,12 @@ -import { Controller, Get, Render } from '@nestjs/common'; +import { Controller, Get, Render, Req } from '@nestjs/common'; +import { Request } from 'express'; @Controller() export class AppController { @Get() @Render('index') - index() {} + index(@Req() req: Request) { + const jwt = req.cookies['_token']; + return { jwt }; + } } -- cgit v1.2.3-70-g09d2