UNPKG

youzanyun-devtool-worker

Version:

28 lines (27 loc) 801 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const axios_1 = tslib_1.__importDefault(require("axios")); let dpShowcaseResources; class DpShowcaseResources { static getInstance() { if (!dpShowcaseResources) { dpShowcaseResources = new DpShowcaseResources(); } return dpShowcaseResources; } async run(ctx, webPort) { let { appId, tempId } = ctx.query; let res = await (0, axios_1.default)({ method: "get", url: `http://127.0.0.1:${webPort}/api/design-platform/get-comps-file`, params: { appId, tempId } }); ctx.body = res.data; } } exports.default = DpShowcaseResources; ;