Skip to content

Commit

Permalink
feat: update seed
Browse files Browse the repository at this point in the history
  • Loading branch information
sadmann7 committed May 27, 2024
1 parent 5a78e32 commit 95df920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/db/seed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
revalidate,
revalidateItems,
seedCategories,
seedSubcategories,
} from "@/lib/actions/seed"
Expand All @@ -13,7 +13,9 @@ async function runSeed() {

await seedSubcategories()

await revalidate()
// Add more seed functions here

await revalidateItems()

const end = Date.now()

Expand Down
2 changes: 1 addition & 1 deletion src/lib/actions/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { productConfig } from "@/config/product"
import { generateId } from "@/lib/id"
import { absoluteUrl, slugify } from "@/lib/utils"

export async function revalidate() {
export async function revalidateItems() {
console.log("🔄 Revalidating...")
await fetch(absoluteUrl("/api/revalidate"))
}
Expand Down

0 comments on commit 95df920

Please sign in to comment.