Skip to content

Commit

Permalink
remove more calls to deprecated endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
jelveh committed Mar 30, 2024
1 parent 0094e2e commit 51bb418
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2455,27 +2455,6 @@ window.move_items = async function(el_items, dest_path, is_undo = false){
}

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($(el_item).attr('data-is_dir') === '1'){
// disassociate all its websites
Expand All @@ -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();
// 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);

// 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 (){
}
})
}
}

Expand Down

0 comments on commit 51bb418

Please sign in to comment.