UNPKG

youzanyun-devtool-worker

Version:

94 lines (93 loc) 4.22 kB
"use strict"; 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 DatabaseController = class DatabaseController extends BaseController_1.default { async downloadMySQL(ctx, next) { let { workbenchId, projectId } = ctx.query; return await this.databaseService.downloadMysql({ workbenchId, projectId }); } async downloadRedis(ctx, next) { let { workbenchId, projectId } = ctx.query; return await this.databaseService.downloadRedis({ workbenchId, projectId }); } async startMySql(ctx, next) { let { workbenchId, projectId } = ctx.query; return await this.databaseService.startMysql({ workbenchId, projectId }); } async stopMySql(ctx, next) { let { workbenchId, projectId } = ctx.query; return await this.databaseService.stopMysql({ workbenchId, projectId }); } async startRedis(ctx, next) { let { workbenchId, projectId } = ctx.query; return await this.databaseService.startRedis({ workbenchId, projectId }); } async stopRedis(ctx, next) { let { workbenchId, projectId } = ctx.query; return await this.databaseService.stopRedis({ workbenchId, projectId }); } async syncMysql(ctx, next) { let { workbenchId, projectId, type } = ctx.query; return await this.databaseService.syncMysql({ workbenchId, projectId, type }); } async getMpLog(ctx, next) { let { releaseId } = ctx.query; return await this.deployPollService.getMpLog(releaseId); } async getGeneralLog(ctx, next) { let { releaseId } = ctx.query; return await this.deployPollService.getGeneralLog(releaseId); } async getRemoteDebugMpBuildLog(ctx, next) { let { releaseId, type } = ctx.query; return await this.mpRemoteDebugService.getLog(releaseId, type); } }; tslib_1.__decorate([ (0, spring4js_nodejs_1.Resource)() ], DatabaseController.prototype, "databaseService", void 0); tslib_1.__decorate([ (0, spring4js_nodejs_1.Resource)() ], DatabaseController.prototype, "deployPollService", void 0); tslib_1.__decorate([ (0, spring4js_nodejs_1.Resource)() ], DatabaseController.prototype, "mpRemoteDebugService", void 0); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("download-mysql", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "downloadMySQL", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("download-redis", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "downloadRedis", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("start-mysql", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "startMySql", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("stop-mysql", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "stopMySql", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("start-redis", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "startRedis", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("stop-redis", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "stopRedis", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("sync-mysql", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "syncMysql", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("get-mp-log", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "getMpLog", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("get-general-log", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "getGeneralLog", null); tslib_1.__decorate([ (0, spring4js_nodejs_1.Path)("get-remote-debug-mp-file", spring4js_nodejs_1.HttpMethod.GET) ], DatabaseController.prototype, "getRemoteDebugMpBuildLog", null); DatabaseController = tslib_1.__decorate([ (0, spring4js_nodejs_1.Controller)("/api/common-tool") ], DatabaseController); exports.default = DatabaseController;