removed misplaced await that was breaking query

This commit is contained in:
Andrzej Stepien 2023-08-09 17:26:46 +02:00
parent e8fdd91529
commit 339fe2cd19
2 changed files with 5 additions and 3 deletions

Binary file not shown.

View File

@ -1,9 +1,11 @@
import { db } from "./db.mjs"
export default async function getNewPrompt({ minCount = 200000, maxCount = 30000000, rarityBias = 0.5 }) {
const badWords = await db('bad_words')
const badWords = db('bad_words')
.select('word')
export default async function getNewPrompt({ minCount = 200000, maxCount = 30000000, rarityBias = 0.5 }) {
const prompts = await db('dictionary')
.select('*')
.where({
@ -38,7 +40,7 @@ export default async function getNewPrompt({ minCount = 200000, maxCount = 30000
//console.log(await getNewPrompt({}))
console.dir(await getNewPrompt({}))