youzanyun-devtool-worker
Version:
- web - ws - proxy
30 lines (29 loc) • 1.13 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const spring4js_nodejs_1 = require("spring4js-nodejs");
const index_1 = tslib_1.__importDefault(require("./design-platform/index"));
let ActionDesignPlatformService = class ActionDesignPlatformService {
async processRequest(ctx, next) {
let actionType;
if (ctx.path === '/v4/shop/developer-decorate') {
actionType = 'dpDeveloperDecorate';
}
else if (ctx.path === '/cloud/diy/api/design-platform/showcase/template') {
actionType = 'dpShowcaseTemplate';
}
else if (ctx.path === '/cloud/diy/api/design-platform/showcase/template/save') {
actionType = 'saveDpShowcaseTemplate';
}
else {
return false;
}
let actionHandler = index_1.default.getAction(actionType);
await actionHandler.run(ctx);
return true;
}
};
ActionDesignPlatformService = tslib_1.__decorate([
spring4js_nodejs_1.Service()
], ActionDesignPlatformService);
exports.default = ActionDesignPlatformService;