Only reload the page if the clip operation was successful.

This commit is contained in:
voussoir 2018-01-19 21:44:21 -08:00
parent b00d93901a
commit cdd8f9e248

View file

@ -131,10 +131,13 @@ function _paste_unpaste_photo_clipboard(add_or_remove)
var url = "/album/{{album.id}}/" + add_or_remove;
var data = new FormData();
data.append("photo_id", photo_ids);
var callback = function(){
photo_clipboard.clear();
save_photo_clipboard();
location.reload();
var callback = function(response){
if (response["_status"] === 200)
{
photo_clipboard.clear();
save_photo_clipboard();
location.reload();
}
};
post(url, data, callback);
}