更新 'SrcJyPublic.js'

master
src48597962 4 months ago
parent c88ea6fb93
commit 83acecb702
  1. 11
      SrcJyPublic.js

@ -983,13 +983,10 @@ function shareResource() {
} }
let textcontent = globalMap0.getVar('Jy_gmParams').zip(JSON.stringify(text)); let textcontent = globalMap0.getVar('Jy_gmParams').zip(JSON.stringify(text));
try{ try{
log("content="+textcontent+"&path="+it.path+"&auth_code="+it.token); let pasteupdate = JSON.parse(request('https://pasteme.tyrantg.com/api/update', {
let json = post('https://pasteme.tyrantg.com/api/update', { body: 'content='+textcontent+'&path='+it.path+'@juying'+'&auth_code='+it.token,
"body": "content="+textcontent+"&path="+it.path+"&auth_code="+it.token method: 'POST'
}) }));
log(json);
let pasteupdate = JSON.parse(json);
log('2');
if(pasteupdate.result_code=="SUCCESS"){ if(pasteupdate.result_code=="SUCCESS"){
let resources = Juconfig['shareResource'] || []; let resources = Juconfig['shareResource'] || [];
const index = resources.findIndex(item => item.path === it.path); const index = resources.findIndex(item => item.path === it.path);

Loading…
Cancel
Save