Have bookmark editor show errors on non 200 responses.

This commit is contained in:
voussoir 2019-01-13 15:05:03 -08:00
parent 536531848e
commit b864397242

View file

@ -117,12 +117,17 @@ function on_save(ed, edit_element_map, display_element_map)
{
function callback(response)
{
ed.hide_spinner();
if (response["meta"]["status"] != 200)
{
ed.show_error("Status: " + response["meta"]["status"]);
return;
}
ed.save();
display_element_map["title"].href = response["data"]["url"];
display_element_map["url"].href = response["data"]["url"];
}
edit_element_map["title"];
edit_element_map["url"].value = edit_element_map["url"].value.trim();
if (!edit_element_map["url"].value)
{