mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-27 22:29:27 +00:00
upgrade prettier
This commit is contained in:
parent
75f5ec4393
commit
b65fd5568a
@ -16,9 +16,10 @@ const AdminProduct = Discourse.Model.extend({
|
|||||||
active: this.active
|
active: this.active
|
||||||
};
|
};
|
||||||
|
|
||||||
return ajax("/patrons/admin/products", { method: "post", data }).then(
|
return ajax("/patrons/admin/products", {
|
||||||
product => AdminProduct.create(product)
|
method: "post",
|
||||||
);
|
data
|
||||||
|
}).then(product => AdminProduct.create(product));
|
||||||
},
|
},
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
@ -44,9 +45,9 @@ AdminProduct.reopenClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
find(id) {
|
find(id) {
|
||||||
return ajax(`/patrons/admin/products/${id}`, { method: "get" }).then(
|
return ajax(`/patrons/admin/products/${id}`, {
|
||||||
product => AdminProduct.create(product)
|
method: "get"
|
||||||
);
|
}).then(product => AdminProduct.create(product));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -28,9 +28,10 @@ const AdminSubscription = Discourse.Model.extend({
|
|||||||
|
|
||||||
AdminSubscription.reopenClass({
|
AdminSubscription.reopenClass({
|
||||||
find() {
|
find() {
|
||||||
return ajax("/patrons/admin/subscriptions", { method: "get" }).then(
|
return ajax("/patrons/admin/subscriptions", {
|
||||||
result =>
|
method: "get"
|
||||||
result.data.map(subscription => AdminSubscription.create(subscription))
|
}).then(result =>
|
||||||
|
result.data.map(subscription => AdminSubscription.create(subscription))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user