discourse-subscriptions/assets/javascripts/discourse/models/group.js.es6

19 lines
390 B
Plaintext
Raw Normal View History

2019-10-09 22:52:55 -04:00
import { ajax } from "discourse/lib/ajax";
const Group = Discourse.Model.extend({});
Group.reopenClass({
subscriptionGroup:
Discourse.SiteSettings.discourse_patrons_subscription_group,
find() {
return ajax(`/groups/${this.subscriptionGroup}`, { method: "get" }).then(
result => {
return Group.create(result.group);
}
);
}
});
export default Group;