t-comm
Version:
专业、稳定、纯粹的工具库
35 lines (32 loc) • 890 B
JavaScript
import { b as __awaiter, c as __generator } from '../../tslib.es6-48fa7a9b.js';
import { fetchCloudData } from '../base/base.js';
var AREA_MAP = {
MAINLAND: 'mainland',
OVERSEAS: 'overseas',
GLOBAL: 'global'
};
function pushUrlCache(_a) {
var secretId = _a.secretId,
secretKey = _a.secretKey,
_b = _a.area,
area = _b === void 0 ? AREA_MAP.GLOBAL : _b,
urls = _a.urls;
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_c) {
return [2 /*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
})
})];
});
});
}
export { pushUrlCache };