discourse/app/assets/javascripts/admin/addon/controllers/admin-api-keys-index.js
2020-12-01 15:31:26 -03:00

15 lines
310 B
JavaScript

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