plan model with destroy and find
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
const Plan = Discourse.Model.extend({
|
||||
destroy() { }
|
||||
});
|
||||
|
||||
Plan.reopenClass({
|
||||
find() {
|
||||
return ajax("/patrons/admin/plans", { method: "get" })
|
||||
.then(result => result.plans.map(plan => Plan.create(plan)));
|
||||
}
|
||||
});
|
||||
|
||||
export default Plan;
|
||||
Reference in New Issue
Block a user