From ec1f3ebc562824c846d23d997eba587679820cd2 Mon Sep 17 00:00:00 2001 From: Thomas Haaf Date: Wed, 12 Jun 2024 14:57:38 +0200 Subject: [PATCH] fix deprecated faker call --- server/src/service/testdata-generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/service/testdata-generator.ts b/server/src/service/testdata-generator.ts index 872f6c8..e8b4777 100644 --- a/server/src/service/testdata-generator.ts +++ b/server/src/service/testdata-generator.ts @@ -149,7 +149,7 @@ export async function createRandomAttachment(post: PostEntity, seed?: number): P const data = await generateRandomPng(faker.datatype.number()); const file: FileEntity = await FileEntity.fromData(await data.arrayBuffer()); await AppDataSource.manager.createQueryBuilder().insert().into(FileEntity).values(file).onConflict('("sha256") DO NOTHING').execute(); - const attachment: AttachmentEntity = { post, file, filename: faker.random.word() + ".png" }; + const attachment: AttachmentEntity = { post, file, filename: faker.lorem.word() + ".png" }; await AppDataSource.manager.getRepository(AttachmentEntity).insert(attachment); return attachment; } catch (e) {