Don't select all in events query

This commit is contained in:
Regalijan 2024-02-14 14:29:40 -05:00
parent 4ba23c2ad5
commit 98b191167b
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -16,7 +16,7 @@ import { type ReactNode } from "react";
export async function loader({ context }: { context: RequestContext }) { export async function loader({ context }: { context: RequestContext }) {
const now = new Date(); const now = new Date();
const monthEventList = await context.env.D1.prepare( const monthEventList = await context.env.D1.prepare(
"SELECT * FROM events WHERE month = ? AND year = ?;", "SELECT created_by, day, month, type, year FROM events WHERE month = ? AND year = ?;",
) )
.bind(now.getUTCMonth() + 1, now.getUTCFullYear()) .bind(now.getUTCMonth() + 1, now.getUTCFullYear())
.all(); .all();