Skip to content

Commit

Permalink
adapt backend image faking due to deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula committed Apr 29, 2024
1 parent 7b3ed63 commit 6cecd36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion backend/src/db/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
24 changes: 12 additions & 12 deletions backend/src/db/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
Expand All @@ -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,
}),
},
Expand Down Expand Up @@ -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,
}),
},
Expand Down Expand Up @@ -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,
}),
},
Expand All @@ -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,
}),
},
Expand Down Expand Up @@ -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'],
Expand Down Expand Up @@ -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' }),
}),
},
)
Expand Down Expand Up @@ -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' }),
}),
},
)
Expand Down Expand Up @@ -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' }),
}),
},
)
Expand Down Expand Up @@ -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' }),
}),
},
)
Expand Down Expand Up @@ -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' }),
}),
},
)
Expand Down Expand Up @@ -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' }),
}),
},
)
Expand Down

0 comments on commit 6cecd36

Please sign in to comment.