a3c17c2757
no issue - follow similar retry-then-poll behaviour as the confirm email modal
31 lines
815 B
JavaScript
31 lines
815 B
JavaScript
import Model from 'ember-data/model';
|
|
import attr from 'ember-data/attr';
|
|
import {belongsTo} from 'ember-data/relationships';
|
|
import {equal} from '@ember/object/computed';
|
|
|
|
export default Model.extend({
|
|
emailCount: attr('number'),
|
|
error: attr('string'),
|
|
html: attr('string'),
|
|
plaintext: attr('string'),
|
|
stats: attr('json-string'),
|
|
status: attr('string'),
|
|
subject: attr('string'),
|
|
submittedAtUTC: attr('moment-utc'),
|
|
uuid: attr('string'),
|
|
|
|
createdAtUTC: attr('moment-utc'),
|
|
createdBy: attr('string'),
|
|
updatedAtUTC: attr('moment-utc'),
|
|
updatedBy: attr('string'),
|
|
|
|
post: belongsTo('post'),
|
|
|
|
isSuccess: equal('status', 'submitted'),
|
|
isFailure: equal('status', 'failed'),
|
|
|
|
retry() {
|
|
return this.store.adapterFor('email').retry(this);
|
|
}
|
|
});
|