2019-12-17 16:31:58 +11:00
|
|
|
import EmberObject from "@ember/object";
|
2019-10-25 08:18:16 +11:00
|
|
|
import { ajax } from "discourse/lib/ajax";
|
|
|
|
|
|
2024-11-29 15:42:50 +00:00
|
|
|
export default class Product extends EmberObject {
|
|
|
|
|
static findAll() {
|
2020-10-21 13:36:31 -05:00
|
|
|
return ajax("/s", { method: "get" }).then((result) =>
|
2020-09-16 09:53:50 -05:00
|
|
|
result.map((product) => Product.create(product))
|
2019-10-25 08:18:16 +11:00
|
|
|
);
|
2024-11-29 15:42:50 +00:00
|
|
|
}
|
|
|
|
|
}
|