Unfinished

This commit is contained in:
aronmal 2024-02-18 22:02:52 +01:00
parent 18c6535d1c
commit 6b388729d9
Signed by: aronmal
GPG key ID: 816B7707426FC612
25 changed files with 1598 additions and 2352 deletions

View file

@ -0,0 +1,28 @@
import { APIEvent } from "@solidjs/start/server/types";
import { eq } from "drizzle-orm";
import db from "~/drizzle";
import { guilds } from "~/drizzle/schema";
export const GET = async ({ params }: APIEvent) => {
const guild = await db.query.guilds
.findFirst({
where: eq(guilds.id, params.guildId),
with: {
timePlanning: { with: { messages: true } },
matches: true,
},
})
.execute();
if (!guild)
return new Response(JSON.stringify({ error: "No such guild found." }), {
status: 404,
});
return "TODO";
// return guild.timePlanning;
};
export const PUT = async () => {
return "TODO";
};