This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
wikipedia-game-solver/apps/api/src/database/factories/page_factory.ts

15 lines
395 B
TypeScript
Raw Normal View History

2024-08-15 15:14:21 +02:00
import Page from "#app/models/page.ts"
2024-08-12 14:21:34 +02:00
import factory from "@adonisjs/lucid/factories"
import { sanitizePageTitle } from "@repo/wikipedia-game-solver/wikipedia-utils"
export const PageFactory = factory
.define(Page, async ({ faker }) => {
return {
title: sanitizePageTitle(faker.commerce.productName()),
}
})
.relation("internalLinks", () => {
return []
})
2024-08-12 14:21:34 +02:00
.build()