????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/cms/controller/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/cms/controller/bai-viet.controller.js |
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaiVietController = void 0; const openapi = require("@nestjs/swagger"); const common_1 = require("@nestjs/common"); const crud_1 = require("@rewiko/crud"); const swagger_1 = require("@nestjs/swagger"); const entity_1 = require("../entity"); const service_1 = require("../service"); const cms_interceptor_1 = require("../interceptor/cms.interceptor"); const auth_guard_1 = require("../../auth/auth.guard"); let BaiVietController = class BaiVietController { constructor(service) { this.service = service; } }; BaiVietController = __decorate([ (0, crud_1.Crud)({ model: { type: entity_1.BaiViet }, params: { bai_viet_id: { field: 'id', primary: true, type: 'string' }, }, query: { join: { chuyenMuc: { allow: ['tenChuyenMuc', 'maChuyenMuc', 'duongDan'], alias: 'chuyenMuc' }, nguoiTao: { allow: ['tenHienThi', 'email'], alias: 'nguoiTao' } } }, routes: { exclude: ['createManyBase'], createOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken'), (0, common_1.UseInterceptors)(cms_interceptor_1.CmsInterceptor)] }, updateOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] }, replaceOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] }, deleteOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] } } }), (0, swagger_1.ApiTags)('Quản lý bài viết'), (0, common_1.Controller)('bai-viet'), __metadata("design:paramtypes", [service_1.BaiVietService]) ], BaiVietController); exports.BaiVietController = BaiVietController;