UNPKG

youzanyun-devtool-worker

Version:

- web - ws - proxy

26 lines (25 loc) 771 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const axios_1 = tslib_1.__importDefault(require("axios")); let saveDpShowcaseTemplate; class SaveDpShowcaseTemplate { static getInstance() { if (!saveDpShowcaseTemplate) { saveDpShowcaseTemplate = new SaveDpShowcaseTemplate(); } return saveDpShowcaseTemplate; } async run(ctx) { const data = ctx.request.body; const res = await axios_1.default({ method: "POST", url: "http://127.0.0.1:31240/api/design-platform/template/update", data, headers: ctx.header }); ctx.body = res.data; } } exports.default = SaveDpShowcaseTemplate; ;