Alert response if set searchhidden fails.

This commit is contained in:
voussoir 2020-11-03 15:33:59 -08:00
parent fbaa7843da
commit cc8053f8fd

View file

@ -433,11 +433,20 @@ function set_searchhidden_form(event)
const checkbox = event.target;
if (checkbox.checked)
{
api.photos.set_searchhidden(PHOTO_ID);
api.photos.set_searchhidden(PHOTO_ID, set_searchhidden_callback);
}
else
{
api.photos.unset_searchhidden(PHOTO_ID);
api.photos.unset_searchhidden(PHOTO_ID, set_searchhidden_callback);
}
}
function set_searchhidden_callback(response)
{
if (response.meta.status !== 200)
{
alert(JSON.stringify(response));
return;
}
}