feat: Introduce Dockerization and shift product data sourcing from external API to local files.
This commit is contained in:
9
index.js
9
index.js
@@ -60,13 +60,10 @@ async function compareAndSave(productsPrice) {
|
||||
}
|
||||
|
||||
async function getProducts() {
|
||||
const products = await axios
|
||||
.get(
|
||||
"https://db.maciaszek.ovh/api/collections/gifts_items/records?fields=ceneo_id&filter=ceneo_id!=''"
|
||||
)
|
||||
.then((response) => response.data.items.map((item) => item.ceneo_id));
|
||||
const products = fs.readFileSync("input.txt", "utf8");
|
||||
const productsIds = products.split("\n");
|
||||
|
||||
return products;
|
||||
return productsIds;
|
||||
}
|
||||
|
||||
async function init() {
|
||||
|
||||
Reference in New Issue
Block a user