bracket-backend/src/app.controller.ts

17 lines
476 B
TypeScript
Raw Normal View History

2025-02-07 14:54:10 +01:00
import { CacheInterceptor } from '@nestjs/cache-manager';
import { VersionEntity } from './common/models/entities/version.entity';
import { Controller, Get, UseInterceptors } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
2025-02-07 12:47:58 +01:00
@Controller()
2025-02-07 14:54:10 +01:00
@ApiTags('Misc')
2025-02-07 12:47:58 +01:00
@UseInterceptors(CacheInterceptor)
2025-02-07 14:54:10 +01:00
export class AppController {
@Get('version')
async getVersion(): Promise<VersionEntity> {
return {
version: process.env.npm_package_version,
};
}
2025-02-07 12:47:58 +01:00
}