Files
ulitka/src/app.controller.ts
T
vadim 7b999a670c
Gitea Actions Demo / Deploy (push) Failing after 18s
init
2026-09-24 10:34:27 +03:00

20 lines
473 B
TypeScript

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;
}
}