file & doc: create and update the actions index file
This commit is contained in:
1 parent
8e6c8c5511
commit
a0023b7785
1 file changed
+12
@@ -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}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user