21 lines
740 B
TypeScript
21 lines
740 B
TypeScript
import { Controller, Get, HttpStatus } from '@nestjs/common';
|
|
import { HomeService } from './home.service';
|
|
import { ApiTags, ApiOperation, ApiResponse, ApiOkResponse } from '@nestjs/swagger';
|
|
|
|
@ApiTags('Home - صفحه اصلی')
|
|
@Controller('home')
|
|
@ApiResponse({
|
|
status: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
description: 'خطای داخلی سرور'
|
|
})
|
|
export class HomeController {
|
|
constructor(private readonly homeService: HomeService) {}
|
|
|
|
@Get()
|
|
@ApiOperation({ summary: 'دریافت اطلاعات صفحه اصلی' })
|
|
@ApiOkResponse({ description: 'اطلاعات ویترین، بنرها، پرفروشترینها، وبلاگ و غیره' })
|
|
getHomeData() {
|
|
return this.homeService.getHomeData();
|
|
}
|
|
}
|