Initial commit

This commit is contained in:
2025-10-02 08:54:03 +02:00
commit ea54638227
1642 changed files with 53677 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
const { attachRatingObjsToProduct } = require("./helper")
;(function () {
if (context.user.auth()) return
const bigCommerceProductId = context.request().query("bigCommerceProductId")
if (bigCommerceProductId) {
/**@type {LocalProduct[]} */
//@ts-ignore
let products = context.db.find("bigCommerceProduct", {
filter: {
bigCommerceId: Number(bigCommerceProductId),
},
})
products = attachRatingObjsToProduct(products)
if (products.length > 0) {
throw {
status: 200,
data: products[0],
}
}
}
return
})()