DEV: Use popupAjaxError instead of bootbox (#153)

This commit is contained in:
Penar Musaraj 2022-10-18 13:58:55 -04:00 committed by GitHub
parent f7d9d13de8
commit fa2ec23ebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { propertyNotEqual } from "discourse/lib/computed";
import { bufferedProperty } from "discourse/mixins/buffered-content";
import bootbox from "bootbox";
import Controller, { inject as controller } from "@ember/controller";
import { not, or } from "@ember/object/computed";
@ -91,7 +90,7 @@ export default Controller.extend(bufferedProperty("model"), {
houseAds.removeObject(model);
this.transitionToRoute("adminPlugins.houseAds.index");
})
.catch(() => bootbox.alert(I18n.t("generic_error")));
.catch(popupAjaxError);
},
},
});