UNPKG

youzanyun-devtool-worker

Version:

29 lines (28 loc) 850 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const axios_1 = tslib_1.__importDefault(require("axios")); let dpShowcaseTemplate; class DpShowcaseTemplate { static getInstance() { if (!dpShowcaseTemplate) { dpShowcaseTemplate = new DpShowcaseTemplate(); } return dpShowcaseTemplate; } async run(ctx, webPort) { const { templateId, status, appName } = ctx.query; const res = await (0, axios_1.default)({ method: "GET", url: `http://127.0.0.1:${webPort}/api/design-platform/local/template/detail`, params: { status, templateId, appName, } }); ctx.body = res.data; } } exports.default = DpShowcaseTemplate; ;