mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-23 19:47:55 +00:00
24 lines
794 B
TypeScript
24 lines
794 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { RegionService } from '../services/region.service';
|
|
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
|
import { ControllerRoute } from '@app/common/constants/controller-route';
|
|
import { EnableDisableStatusEnum } from '@app/common/constants/days.enum';
|
|
|
|
@ApiTags('Region Module')
|
|
@Controller({
|
|
version: EnableDisableStatusEnum.ENABLED,
|
|
path: ControllerRoute.REGION.ROUTE,
|
|
})
|
|
export class RegionController {
|
|
constructor(private readonly regionService: RegionService) {}
|
|
|
|
@Get()
|
|
@ApiOperation({
|
|
summary: ControllerRoute.REGION.ACTIONS.GET_REGIONS_SUMMARY,
|
|
description: ControllerRoute.REGION.ACTIONS.GET_REGIONS_DESCRIPTION,
|
|
})
|
|
async getAllRegions() {
|
|
return await this.regionService.getAllRegions();
|
|
}
|
|
}
|