mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-03 08:09:26 +00:00
14 lines
271 B
JavaScript
14 lines
271 B
JavaScript
import { ajax } from "discourse/lib/ajax";
|
|
|
|
const Plan = Discourse.Model.extend({});
|
|
|
|
Plan.reopenClass({
|
|
find() {
|
|
return ajax("/patrons/plans", { method: "get" }).then(result =>
|
|
result.plans.map(plan => Plan.create(plan))
|
|
);
|
|
}
|
|
});
|
|
|
|
export default Plan;
|