m
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
"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.ConfigController = void 0;
|
||||
const openapi = require("@nestjs/swagger");
|
||||
const common_1 = require("@nestjs/common");
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const api_1 = require("../../common/api");
|
||||
const system_config_model_1 = require("../../../model/system_config.model");
|
||||
const public_decorator_1 = require("../../common/decorator/public.decorator");
|
||||
const system_config_service_1 = require("../../common/service/system_config.service");
|
||||
let ConfigController = class ConfigController {
|
||||
systemConfigService;
|
||||
constructor(systemConfigService) {
|
||||
this.systemConfigService = systemConfigService;
|
||||
}
|
||||
async getSystemConfig() {
|
||||
const config = await this.systemConfigService.readConfig();
|
||||
return api_1.Api.success(config);
|
||||
}
|
||||
};
|
||||
exports.ConfigController = ConfigController;
|
||||
__decorate([
|
||||
(0, common_1.Get)('system'),
|
||||
(0, public_decorator_1.AuthPublic)(),
|
||||
(0, swagger_1.ApiOperation)({ summary: '获取系统配置' }),
|
||||
api_1.Api.ApiResponse({
|
||||
codeDescription: '200 成功',
|
||||
model: system_config_model_1.SystemConfigModel,
|
||||
}),
|
||||
openapi.ApiResponse({ status: 200 }),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], ConfigController.prototype, "getSystemConfig", null);
|
||||
exports.ConfigController = ConfigController = __decorate([
|
||||
(0, common_1.Controller)('config'),
|
||||
(0, swagger_1.ApiTags)('系统配置'),
|
||||
__metadata("design:paramtypes", [system_config_service_1.SystemConfigService])
|
||||
], ConfigController);
|
||||
//# sourceMappingURL=config.controller.js.map
|
||||
Reference in New Issue
Block a user