Init Nest-Neo4j
This commit is contained in:
19
Nest/src/app.controller.ts
Normal file
19
Nest/src/app.controller.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get, UseGuards } from '@nestjs/common';
|
||||
import { AppService } from './app.service';
|
||||
import { JwtAuthGuard } from './auth/jwt.guard';
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
constructor(private readonly appService: AppService) {}
|
||||
@Get()
|
||||
async getHello(): Promise<string> {
|
||||
const greeting = await this.appService.getHello();
|
||||
return greeting;
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get('/protected')
|
||||
async getProtected() {
|
||||
return 'PROTECTED';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user