@tigdevs/thegrey
v1.0.4
Published
Gandalf The Grey will protect your NestJS application from unauthorized users, xss, sqli, nosqli attacks and more.
Downloads
28
Readme
AuthGuard
import { Controller, Get, HttpCode, UseGuards } from '@nestjs/common'
import { YouShallNotPass } from '@tigdevs/thegrey'
import { AppService } from './app.service'
@Controller('test')
export class AppController {
constructor(private readonly appService: AppService) {}
@Get('users')
@HttpCode(200)
@UseGuards(YouShallNotPass)
public listUsers(): Array<Record<string, unknown>> {
return this.appService.listUsers()
}
}