fix: redirect / to /login in WebController
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Controller, Get, Render, Req, UseGuards } from '@nestjs/common';
|
||||
import { Controller, Get, Render, Req, UseGuards, Res } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import type { Request } from 'express';
|
||||
import type { Request, Response } from 'express';
|
||||
import { Public } from '../common/decorators/public.decorator';
|
||||
import { Roles } from '../common/decorators/roles.decorator';
|
||||
import { RolesGuard } from '../common/guards/roles.guard';
|
||||
@@ -12,6 +12,12 @@ import { PrismaService } from '../prisma/prisma.service';
|
||||
export class WebController {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
@Public()
|
||||
@Get()
|
||||
root(@Res() res: Response) {
|
||||
res.redirect('/login');
|
||||
}
|
||||
|
||||
@Public()
|
||||
@Get('login')
|
||||
@Render('auth/login')
|
||||
|
||||
Reference in New Issue
Block a user