commit
7b999a670c
243 files changed
+24818
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { AllowAnonymous, Session, type UserSession } from '@thallesp/nestjs-better-auth';
|
||||
import { AppService } from './app.service.js';
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
constructor(private readonly appService: AppService) {}
|
||||
|
||||
@Get()
|
||||
@AllowAnonymous()
|
||||
getHello(): string {
|
||||
return this.appService.getHello();
|
||||
}
|
||||
|
||||
@Get('me')
|
||||
getMe(@Session() session: UserSession) {
|
||||
return session.user;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user