discourse/app/assets/javascripts/admin/controllers/admin-api-keys-index.js
2020-03-13 17:03:08 -04:00

15 lines
308 B
JavaScript

import { popupAjaxError } from "discourse/lib/ajax-error";
import Controller from "@ember/controller";
export default Controller.extend({
actions: {
revokeKey(key) {
key.revoke().catch(popupAjaxError);
},
undoRevokeKey(key) {
key.undoRevoke().catch(popupAjaxError);
}
}
});