Data generator: Fixed the URL formatting for newsletter clicks

no issue
This commit is contained in:
Sam Lord 2023-03-30 16:49:13 +01:00
parent e5fc4bd6ba
commit 1d7572fed5

View File

@ -24,7 +24,7 @@ class RedirectsImporter extends TableImporter {
return {
id: faker.database.mongodbObjectId(),
from: `/r/${faker.datatype.hexadecimal({length: 32, prefix: '', case: 'lower'})}`,
to: `https://${faker.internet.url()}/${faker.helpers.slugify(`${faker.word.adjective()} ${faker.word.noun()}`).toLowerCase()}`,
to: `${faker.internet.url()}/${faker.helpers.slugify(`${faker.word.adjective()} ${faker.word.noun()}`).toLowerCase()}`,
post_id: this.model.id,
created_at: this.model.published_at,
updated_at: this.model.published_at