diff --git a/backend/src/db/factories.ts b/backend/src/db/factories.ts index f410e8b295..c75c92fdd0 100644 --- a/backend/src/db/factories.ts +++ b/backend/src/db/factories.ts @@ -2,7 +2,7 @@ import { v4 as uuid } from 'uuid' import slugify from 'slug' import { hashSync } from 'bcryptjs' import { Factory } from 'rosie' -import { faker } from '@faker-js/faker' +import { faker } from '@faker-js/faker' import { getDriver, getNeode } from './neo4j' import CONFIG from '../config/index' import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode' diff --git a/backend/src/db/seed.ts b/backend/src/db/seed.ts index 53cd4cea68..bff236f648 100644 --- a/backend/src/db/seed.ts +++ b/backend/src/db/seed.ts @@ -632,7 +632,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat16'], author: peterLustig, image: Factory.build('image', { - url: faker.image.unsplash.food(300, 169), + url: faker.image.urlLoremFlickr({ category: 'food', width: 300, height: 169 }), sensitive: true, aspectRatio: 300 / 169, }), @@ -648,7 +648,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: bobDerBaumeister, image: Factory.build('image', { - url: faker.image.unsplash.technology(300, 1500), + url: faker.image.urlLoremFlickr({ category: 'technics', width: 300, height: 1500 }), aspectRatio: 300 / 1500, }), }, @@ -696,7 +696,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat6'], author: peterLustig, image: Factory.build('image', { - url: faker.image.unsplash.buildings(300, 857), + url: faker.image.urlLoremFlickr({ category: 'city', width: 300, height: 857 }), aspectRatio: 300 / 857, }), }, @@ -735,7 +735,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat11'], author: louie, image: Factory.build('image', { - url: faker.image.unsplash.people(300, 901), + url: faker.image.urlLoremFlickr({ category: 'people', width: 300, height: 901 }), aspectRatio: 300 / 901, }), }, @@ -761,7 +761,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat14'], author: jennyRostock, image: Factory.build('image', { - url: faker.image.unsplash.objects(300, 200), + url: faker.image.urlLoremFlickr({ category: 'abstract', width: 300, height: 200 }), aspectRatio: 300 / 450, }), }, @@ -821,7 +821,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] mutation: createPostMutation(), variables: { id: 'p8', - image: faker.image.unsplash.nature(), + image: faker.image.urlLoremFlickr({ category: 'nature' }), title: `Quantum Flow Theory explains Quantum Gravity`, content: hashtagAndMention1, categoryIds: ['cat8'], @@ -1178,7 +1178,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: jennyRostock, image: Factory.build('image', { - url: faker.image.unsplash.objects(), + url: faker.image.urlLoremFlickr({ category: 'abstract' }), }), }, ) @@ -1229,7 +1229,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: peterLustig, image: Factory.build('image', { - url: faker.image.unsplash.buildings(), + url: faker.image.urlLoremFlickr({ category: 'city' }), }), }, ) @@ -1280,7 +1280,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: dewey, image: Factory.build('image', { - url: faker.image.unsplash.food(), + url: faker.image.urlLoremFlickr({ category: 'food' }), }), }, ) @@ -1331,7 +1331,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: louie, image: Factory.build('image', { - url: faker.image.unsplash.technology(), + url: faker.image.urlLoremFlickr({ category: 'technics' }), }), }, ) @@ -1382,7 +1382,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: bobDerBaumeister, image: Factory.build('image', { - url: faker.image.unsplash.people(), + url: faker.image.urlLoremFlickr({ category: 'people' }), }), }, ) @@ -1433,7 +1433,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] categoryIds: ['cat1'], author: huey, image: Factory.build('image', { - url: faker.image.unsplash.nature(), + url: faker.image.urlLoremFlickr({ category: 'nature' }), }), }, )