db connection

This commit is contained in:
isaconantonis 2023-08-02 11:23:37 +02:00
parent 6ba28a795c
commit 407016b57c
3 changed files with 17 additions and 15 deletions

View file

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