file & doc: create and update the actions index file

This commit is contained in:
Leon Xu
2023-12-30 13:16:29 -08:00
parent 8e6c8c5511
commit a0023b7785
+12
View File
@@ -0,0 +1,12 @@
'use server'
import { scrapeAmazonProduct } from "../scraper";
export async function scrapeAndStoreProduct(productUrl: string) {
if(!productUrl) return;
try {
const scrapedProudct = await scrapeAmazonProduct(productUrl)
} catch (error: any) {
throw new Error(`Failed to create/update product; ${error.message}`)
}
}