Ghost/ghost/admin/app/models/slack-integration.js

18 lines
477 B
JavaScript
Raw Normal View History

import EmberObject from '@ember/object';
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
import {computed} from '@ember/object';
import {isBlank} from '@ember/utils';
export default EmberObject.extend(ValidationEngine, {
// values entered here will act as defaults
url: '',
username: '',
validationType: 'slackIntegration',
isActive: computed('url', function () {
let url = this.url;
return !isBlank(url);
})
});