next-enterprise/app/actions.ts

12 lines
329 B
TypeScript
Raw Normal View History

2023-08-02 11:13:50 +02:00
import client from "../lib/mongodb";
2023-08-02 10:49:45 +02:00
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();
}