2020-10-22 13:39:00 +03:00
|
|
|
/* eslint-disable ghost/ember/alias-model-in-controller */
|
|
|
|
import Controller from '@ember/controller';
|
2021-04-20 19:25:30 +03:00
|
|
|
import {action} from '@ember/object';
|
2020-10-22 13:39:00 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
|
|
|
import {task} from 'ember-concurrency';
|
|
|
|
|
2021-04-20 19:25:30 +03:00
|
|
|
export default class MembersPaymentsController extends Controller {
|
|
|
|
@service settings;
|
2020-10-22 13:39:00 +03:00
|
|
|
|
2021-04-20 19:25:30 +03:00
|
|
|
@action
|
|
|
|
setDefaultContentVisibility(value) {
|
|
|
|
this.settings.set('defaultContentVisibility', value);
|
|
|
|
}
|
2020-10-22 13:39:00 +03:00
|
|
|
|
2021-04-20 19:25:30 +03:00
|
|
|
@action
|
|
|
|
setStripeConnectIntegrationTokenSetting(stripeConnectIntegrationToken) {
|
|
|
|
this.settings.set('stripeConnectIntegrationToken', stripeConnectIntegrationToken);
|
|
|
|
}
|
2020-10-22 13:39:00 +03:00
|
|
|
|
2021-04-20 19:25:30 +03:00
|
|
|
@task({drop: true})
|
|
|
|
*saveSettings() {
|
|
|
|
return yield this.settings.save();
|
|
|
|
}
|
2020-10-22 13:39:00 +03:00
|
|
|
|
|
|
|
reset() {
|
|
|
|
// stripeConnectIntegrationToken is not a persisted value so we don't want
|
|
|
|
// to keep it around across transitions
|
|
|
|
this.settings.set('stripeConnectIntegrationToken', undefined);
|
|
|
|
}
|
2021-04-20 19:25:30 +03:00
|
|
|
}
|