open-vault/ui/app/components/identity/popup-alias.js
Jordan Reimer 52fe56ec87
Eslint prefer-const (#17864)
* adds prefer-const to eslint config and runs fixer

* reverts unintended change
2022-11-09 15:15:31 -08:00

23 lines
502 B
JavaScript

import Base from './_popup-base';
export default Base.extend({
messageArgs(model) {
const type = model.get('identityType');
const id = model.id;
return [type, id];
},
successMessage(type, id) {
return `Successfully deleted ${type}: ${id}`;
},
errorMessage(e, type, id) {
const error = e.errors ? e.errors.join(' ') : e.message;
return `There was a problem deleting ${type}: ${id} - ${error}`;
},
transaction(model) {
return model.destroyRecord();
},
});