2019-10-08 04:37:22 -04:00
|
|
|
import { ajax } from "discourse/lib/ajax";
|
|
|
|
|
|
|
|
const Plan = Discourse.Model.extend({
|
2019-10-08 18:11:02 -04:00
|
|
|
destroy() {}
|
2019-10-08 04:37:22 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
Plan.reopenClass({
|
|
|
|
find() {
|
2019-10-08 18:11:02 -04:00
|
|
|
return ajax("/patrons/admin/plans", { method: "get" }).then(result =>
|
|
|
|
result.plans.map(plan => Plan.create(plan))
|
|
|
|
);
|
2019-10-08 04:37:22 -04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default Plan;
|