Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
YAlorenzo committed May 22, 2024
1 parent afd5f6e commit 1ef20f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use server";

// import { revalidatePath } from "next/cache";
import { revalidatePath } from "next/cache";
import Product from "../models/product.model";
import { connectToDB } from "../mongoose";
import { scrapeAmazonProduct } from "../scraper";
Expand Down Expand Up @@ -44,7 +44,7 @@ export async function scrapeAndStoreProduct(productUrl: string) {
{ upsert: true, new: true }
);

// revalidatePath(`/products/${newProduct._id}`);
revalidatePath(`/products/${newProduct._id}`);
} catch (error: any) {
throw new Error(`Failed to create/update product: ${error.message}`);
}
Expand Down

0 comments on commit 1ef20f9

Please sign in to comment.