Skip to content
Snippets Groups Projects
Commit 0e7d785f authored by Aaron Dötsch's avatar Aaron Dötsch
Browse files

Fix getArticles db request

parent 6d342594
No related branches found
No related tags found
No related merge requests found
import { db } from "$lib/server/database";
export async function getArticles(includeNotAvailable = false) {
if (includeNotAvailable) return db.item.findMany();
if (includeNotAvailable) return db.item.findMany({ orderBy: { bought: "desc" }});
else return db.item.findMany({ where: { available: true }, orderBy: { bought: "desc" } });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment