decide.nolog.cz/app/controllers/poll-error.js
Jeldrik Hanschke c9482786c1
refactor to native ECMAScript classes (#344)
Replaces Ember's old object model by native ECMAScript classes. Mostly automated with ember-native-class-codemod.
2020-01-18 10:13:50 +01:00

16 lines
453 B
JavaScript

import classic from 'ember-classic-decorator';
import { computed } from '@ember/object';
import { equal } from '@ember/object/computed';
import Controller from '@ember/controller';
import sjcl from 'sjcl';
@classic
export default class PollErrorController extends Controller {
@computed('model')
get decryptionFailed() {
return this.model instanceof sjcl.exception.corrupt;
}
@equal('model.errors.firstObject.status', '404')
notFound;
}