12 lines
365 B
JavaScript
12 lines
365 B
JavaScript
import { db } from "./db.mjs";
|
|
import { isoDate } from "../utilities.mjs";
|
|
export default async function todaysPromptAlreadyPublished() {
|
|
const number = await db('published')
|
|
.count('* as count')
|
|
.where('date', isoDate())
|
|
.catch(error=>{throw error})
|
|
return number[0].count > 0
|
|
}
|
|
|
|
//console.log(await todaysPromptAlreadyPublished())
|