refactor to app directory

This commit is contained in:
isaconantonis 2023-08-02 10:49:45 +02:00
parent 4b9364fdb3
commit 3c8a7543bf
17 changed files with 87 additions and 307 deletions

11
app/actions.ts Normal file
View file

@ -0,0 +1,11 @@
import client from "@/lib/mongodb";
export async function getTeamPlayers() {
const db = client.db("SloppyFuckers")
return await db.collection("players").find({}).toArray();
}
export async function getEvents() {
const db = client.db("SloppyFuckers")
return await db.collection("events").find({}).toArray();
}