mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
remove more calls to deprecated endpoints
This commit is contained in:
parent
0094e2e2cf
commit
51bb41863e
@ -2455,27 +2455,6 @@ window.move_items = async function(el_items, dest_path, is_undo = false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(dest_path === trash_path){
|
if(dest_path === trash_path){
|
||||||
// remove Public Token
|
|
||||||
// todo, some client-side check to see if this dir has an FR associated with it before sending a whole ajax req
|
|
||||||
$.ajax({
|
|
||||||
url: api_origin + "/removepubtok",
|
|
||||||
type: 'POST',
|
|
||||||
data: JSON.stringify({
|
|
||||||
uid: $(el_item).attr('data-uid'),
|
|
||||||
}),
|
|
||||||
async: true,
|
|
||||||
contentType: "application/json",
|
|
||||||
headers: {
|
|
||||||
"Authorization": "Bearer "+auth_token
|
|
||||||
},
|
|
||||||
statusCode: {
|
|
||||||
401: function () {
|
|
||||||
logout();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
success: function (){
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// if trashing dir...
|
// if trashing dir...
|
||||||
if($(el_item).attr('data-is_dir') === '1'){
|
if($(el_item).attr('data-is_dir') === '1'){
|
||||||
// disassociate all its websites
|
// disassociate all its websites
|
||||||
@ -2485,28 +2464,6 @@ window.move_items = async function(el_items, dest_path, is_undo = false){
|
|||||||
$(`.mywebsites-dir-path[data-uuid="${$(el_item).attr('data-uid')}"]`).remove();
|
$(`.mywebsites-dir-path[data-uuid="${$(el_item).attr('data-uid')}"]`).remove();
|
||||||
// remove the website badge from all instances of the dir
|
// remove the website badge from all instances of the dir
|
||||||
$(`.item[data-uid="${$(el_item).attr('data-uid')}"]`).find('.item-has-website-badge').fadeOut(300);
|
$(`.item[data-uid="${$(el_item).attr('data-uid')}"]`).find('.item-has-website-badge').fadeOut(300);
|
||||||
|
|
||||||
// remove File Rrequest Token
|
|
||||||
// todo, some client-side check to see if this dir has an FR associated with it before sending a whole ajax req
|
|
||||||
$.ajax({
|
|
||||||
url: api_origin + "/removefr",
|
|
||||||
type: 'POST',
|
|
||||||
data: JSON.stringify({
|
|
||||||
dir_uid: $(el_item).attr('data-uid'),
|
|
||||||
}),
|
|
||||||
async: true,
|
|
||||||
contentType: "application/json",
|
|
||||||
headers: {
|
|
||||||
"Authorization": "Bearer "+auth_token
|
|
||||||
},
|
|
||||||
statusCode: {
|
|
||||||
401: function () {
|
|
||||||
logout();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
success: function (){
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user