16 lines
461 B
TypeScript
16 lines
461 B
TypeScript
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';
|
|
|
|
@Controller()
|
|
@ApiTags('Misc')
|
|
@UseInterceptors(CacheInterceptor)
|
|
export class AppController {
|
|
@Get('version')
|
|
getVersion(): VersionEntity {
|
|
return {
|
|
version: process.env.npm_package_version,
|
|
};
|
|
}
|
|
}
|