diff --git a/prisma/mock/listings.mts b/prisma/mock/listings.mts index e8a0260..3db96bd 100644 --- a/prisma/mock/listings.mts +++ b/prisma/mock/listings.mts @@ -8,7 +8,7 @@ import { createMockTerm, mockTerm } from './taxonomies.mts'; import { HOMock } from './helpers.mts'; -const mockLocation = { +const mockLocation = () => ({ name: faker.company.name(), geo: { lat: faker.location.latitude(), @@ -25,7 +25,7 @@ const mockLocation = { zipCode: '000000', phone: '01010101010', }, -}; +}); export const createMockListing = ({ community, user, communityFavorited, favorited, audiences, model }: any) => { const data = { diff --git a/prisma/mock/public.mts b/prisma/mock/public.mts index f4540c9..fda07e7 100644 --- a/prisma/mock/public.mts +++ b/prisma/mock/public.mts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; import { HOMock } from './helpers.mts'; -const mockLocation = { +const mockLocation = () => ({ name: faker.company.name(), geo: { lat: faker.location.latitude(), @@ -17,7 +17,7 @@ const mockLocation = { country: 'Sit', zipCode: '000000', }, -}; +}); export const createMockPubListing = ({ user, @@ -104,7 +104,7 @@ export const createMockPubListing = ({ scheduledFor: faker.date.future(), value: faker.number.float(3500), status: 'ACTIVE', - location: mockLocation, + location: mockLocation(), taxonomies, };