file & doc: create and update the actions index file
This commit is contained in:
@@ -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