mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
Update TimeZoneController with ApiOperation and dynamic route
This commit is contained in:
@ -1,13 +1,14 @@
|
||||
import { Controller, Get, UseGuards } from '@nestjs/common';
|
||||
import { TimeZoneService } from '../services/timezone.service';
|
||||
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../../../libs/common/src/guards/jwt.auth.guard';
|
||||
import { EnableDisableStatusEnum } from '@app/common/constants/days.enum';
|
||||
import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
|
||||
@ApiTags('TimeZone Module')
|
||||
@Controller({
|
||||
version: EnableDisableStatusEnum.ENABLED,
|
||||
path: 'timezone',
|
||||
path: ControllerRoute.TIMEZONE.ROUTE,
|
||||
})
|
||||
export class TimeZoneController {
|
||||
constructor(private readonly timeZoneService: TimeZoneService) {}
|
||||
@ -15,6 +16,11 @@ export class TimeZoneController {
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get()
|
||||
@ApiOperation({
|
||||
summary: ControllerRoute.TIMEZONE.ACTIONS.GET_ALL_TIME_ZONES_SUMMARY,
|
||||
description:
|
||||
ControllerRoute.TIMEZONE.ACTIONS.GET_ALL_TIME_ZONES_DESCRIPTION,
|
||||
})
|
||||
async getAllTimeZones() {
|
||||
return await this.timeZoneService.getAllTimeZones();
|
||||
}
|
||||
|
Reference in New Issue
Block a user