14 lines
274 B
Plaintext
Raw Normal View History

2019-10-08 19:37:22 +11:00
import { ajax } from "discourse/lib/ajax";
2019-10-10 13:52:55 +11:00
const Plan = Discourse.Model.extend({});
2019-10-08 19:37:22 +11:00
Plan.reopenClass({
2019-10-17 12:07:06 +11:00
findAll() {
2019-10-10 13:52:55 +11:00
return ajax("/patrons/plans", { method: "get" }).then(result =>
2019-10-09 09:11:02 +11:00
result.plans.map(plan => Plan.create(plan))
);
2019-10-08 19:37:22 +11:00
}
});
export default Plan;