youzanyun-devtool-worker
Version:
24 lines (23 loc) • 946 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const spring4js_nodejs_1 = require("spring4js-nodejs");
const RequestService_1 = tslib_1.__importDefault(require("./RequestService"));
let SessionService = class SessionService extends RequestService_1.default {
async writeSession(options = {}) {
if (!options.projectId && !options.projectName) {
throw new Error('参数错误:未传入应用信息');
}
const headers = await this.handleHeader(options);
delete options.projectId;
delete options.projectName;
let res = await this.axiosInstance.post('https://diy.youzanyun.com/api/custom/devtool/fakeSessionForWeass', {}, {
headers,
});
return res.data;
}
};
SessionService = tslib_1.__decorate([
(0, spring4js_nodejs_1.Service)()
], SessionService);
exports.default = SessionService;