refactor to app directory
This commit is contained in:
parent
4b9364fdb3
commit
3c8a7543bf
17 changed files with 87 additions and 307 deletions
11
app/actions.ts
Normal file
11
app/actions.ts
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue