LocChat/server/app.controller.ts
2021-11-22 14:21:53 -07:00

13 lines
266 B
TypeScript

import { Controller, Get, Render, Req } from '@nestjs/common';
import { Request } from 'express';
@Controller()
export class AppController {
@Get()
@Render('index')
index(@Req() req: Request) {
const jwt = req.cookies['_token'];
return { jwt };
}
}