File size: 573 Bytes
4327358
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { Controller, Get } from '@nestjs/common';
import {
  ApiExtraModels,
  ApiOperation,
  ApiSecurity,
  ApiTags,
} from '@nestjs/swagger';

import { WAHAEnvironment } from '../structures/environment.dto';
import { VERSION } from '../version';

@ApiSecurity('api_key')
@Controller('api/version')
@ApiTags('🔍 Observability')
export class VersionController {
  @Get('')
  @ApiOperation({
    summary: 'Get the server version ',
    deprecated: true,
    description: "Use 'GET /api/server/version' instead ",
  })
  get(): WAHAEnvironment {
    return VERSION;
  }
}