Import doctor reviews through Payload so production seed no longer depends on local psql.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dotenv/config'
|
||||
import { getPayload } from 'payload'
|
||||
import { paidDoctors } from './paid-doctors'
|
||||
import { seedPromotions } from './import-promotions'
|
||||
import { seedReviews } from './import-reviews'
|
||||
import config from '../payload.config'
|
||||
|
||||
const translations = {
|
||||
@@ -359,7 +360,7 @@ async function seed() {
|
||||
|
||||
const existingReviews = await payload.find({ collection: 'reviews', limit: 1 })
|
||||
if (!existingReviews.docs.length) {
|
||||
console.log('Doctor reviews skipped')
|
||||
await seedReviews(payload)
|
||||
}
|
||||
|
||||
await seedPromotions(payload)
|
||||
|
||||
Reference in New Issue
Block a user