2020-01-18 10:13:50 +01:00
|
|
|
import classic from 'ember-classic-decorator';
|
2019-04-23 17:37:42 +02:00
|
|
|
import { computed } from '@ember/object';
|
|
|
|
import { equal } from '@ember/object/computed';
|
2020-01-18 10:13:50 +01:00
|
|
|
import Controller from '@ember/controller';
|
2019-04-23 17:37:42 +02:00
|
|
|
import sjcl from 'sjcl';
|
|
|
|
|
2020-01-18 10:13:50 +01:00
|
|
|
@classic
|
|
|
|
export default class PollErrorController extends Controller {
|
|
|
|
@computed('model')
|
|
|
|
get decryptionFailed() {
|
2019-04-23 17:37:42 +02:00
|
|
|
return this.model instanceof sjcl.exception.corrupt;
|
2020-01-18 10:13:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@equal('model.errors.firstObject.status', '404')
|
|
|
|
notFound;
|
|
|
|
}
|