youzanyun-devtool-worker
Version:
- web - ws - proxy
88 lines (87 loc) • 3.74 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const spring4js_nodejs_1 = require("spring4js-nodejs");
const BaseController_1 = tslib_1.__importDefault(require("../BaseController"));
let CustomCompsController = class CustomCompsController extends BaseController_1.default {
async createDevelopProject(ctx, next) {
const { appId } = ctx.query;
const result = await this.customCompsService.createDevelopProject({ appId });
return result;
}
async updateProject(ctx, next) {
const { appId } = ctx.request.body;
const result = await this.customCompsService.updateProject({ appId });
return result;
}
async getCompsByAppName(ctx, next) {
const params = ctx.query;
const result = await this.customCompsService.getCompsByAppName(params);
return result;
}
async saveComp(ctx, next) {
const params = ctx.request.body;
const result = await this.customCompsService.saveComp(params);
return result;
}
async updateComp(ctx, next) {
const params = ctx.request.body;
const result = await this.customCompsService.updateComp(params);
ctx.body = result;
}
async deleteComp(ctx, next) {
const params = ctx.query;
const result = await this.customCompsService.deleteComp(params);
return result;
}
async batchUpdate(ctx, next) {
const params = ctx.request.body;
const result = await this.dpRequestService.batchUpdate(params);
return result;
}
async batchChangeGroup(ctx, next) {
const params = ctx.request.body;
const result = await this.dpRequestService.batchChangeGroup(params);
return result;
}
};
tslib_1.__decorate([
spring4js_nodejs_1.Resource()
], CustomCompsController.prototype, "configService", void 0);
tslib_1.__decorate([
spring4js_nodejs_1.Resource()
], CustomCompsController.prototype, "userService", void 0);
tslib_1.__decorate([
spring4js_nodejs_1.Resource()
], CustomCompsController.prototype, "customCompsService", void 0);
tslib_1.__decorate([
spring4js_nodejs_1.Resource()
], CustomCompsController.prototype, "dpRequestService", void 0);
tslib_1.__decorate([
spring4js_nodejs_1.Path("project/create", spring4js_nodejs_1.HttpMethod.GET)
], CustomCompsController.prototype, "createDevelopProject", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("project/update", spring4js_nodejs_1.HttpMethod.POST)
], CustomCompsController.prototype, "updateProject", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("comp/list", spring4js_nodejs_1.HttpMethod.GET)
], CustomCompsController.prototype, "getCompsByAppName", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("comp/save", spring4js_nodejs_1.HttpMethod.POST)
], CustomCompsController.prototype, "saveComp", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("comp/update", spring4js_nodejs_1.HttpMethod.POST)
], CustomCompsController.prototype, "updateComp", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("comp/delete", spring4js_nodejs_1.HttpMethod.DELETE)
], CustomCompsController.prototype, "deleteComp", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("comp/batch-update", spring4js_nodejs_1.HttpMethod.POST)
], CustomCompsController.prototype, "batchUpdate", null);
tslib_1.__decorate([
spring4js_nodejs_1.Path("comp/batch-change-group", spring4js_nodejs_1.HttpMethod.POST)
], CustomCompsController.prototype, "batchChangeGroup", null);
CustomCompsController = tslib_1.__decorate([
spring4js_nodejs_1.Controller("/api/design-platform")
], CustomCompsController);
exports.default = CustomCompsController;