1.0.4 • Published 5 years ago

@tigdevs/thegrey v1.0.4

Weekly downloads
13
License
MIT
Repository
gitlab
Last release
5 years ago

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()
    }
}