0
我试图使用删除功能从用户的soundcloud帐户中删除音轨,同时也从我的数据库中删除音轨。它正在成功删除我的数据库中的信息,但不是从soundcloud的数据库中删除,我真的不明白为什么!直到最后没有错误出现,但不会从soundcloud中删除该曲目。在soundcloud帐户中删除音轨不删除
这是我的代码我使用:
$(".deleteTrack").live("click", function() {
if (SC.isConnected) {
var scTid = $(this).attr('id');
var path = "/tracks/" + scTid;
var con = confirm("Are you sure you want to delete this track?");
if (con) {
$.ajax({
type: "POST",
contentType: "application/json",
url: "JamWithInI.aspx/GetTrackInfo",
data: "{'scTid':'" + scTid + "'}",
dataType: "json",
success: function(str){
inst = str.d["1"];
SC.delete(path, function(){
$.ajax({
type: "POST",
contentType: "application/json",
url: "JamWithInI.aspx/DeleteTrack",
data: "{'scTid':'" + scTid + "'}",
dataType: "json",
success: function(){
alert("Your track has been deleted");
$("#openInstruments").trigger('click').trigger('click');
$(".instrument").trigger('click').bind('click').trigger('click');
inst = null;
},
error: function() {
alert("Track did not delete succesfully");
}
});
});
},
error: function() {
alert("An error occurred");
}
});
}
}
});