t-comm
Version:
专业、稳定、纯粹的工具库
40 lines (37 loc) • 1.28 kB
JavaScript
import _regeneratorRuntime from '@babel/runtime/regenerator';
import { _ as __awaiter } from '../../tslib.es6-848120af.js';
import { fetchCloudData } from '../base/base.mjs';
import { AREA_MAP_WITH_GLOBAL } from './config.mjs';
import 'axios';
import '../../nodejs/crypto.mjs';
function pushUrlCache(_ref) {
var secretId = _ref.secretId,
secretKey = _ref.secretKey,
_ref$area = _ref.area,
area = _ref$area === void 0 ? AREA_MAP_WITH_GLOBAL.GLOBAL : _ref$area,
urls = _ref.urls;
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", fetchCloudData({
secretId: secretId,
secretKey: secretKey,
action: 'PushUrlsCache',
version: '2018-06-06',
endpoint: 'cdn.tencentcloudapi.com',
service: 'cdn',
region: '',
payload: JSON.stringify({
Urls: urls,
Area: area
})
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
}
export { pushUrlCache };