adds user accounts, service requests, dashboard, admin panel, better layout, db+altcha+auth support

This commit is contained in:
Aidan 2025-07-07 20:01:59 -04:00
parent dfbc3cade9
commit 0043a5bf3c
40 changed files with 3981 additions and 188 deletions

24
app/api/services/route.ts Normal file
View file

@ -0,0 +1,24 @@
import { db } from "@/db";
import { services } from "@/db/schema";
import { eq } from "drizzle-orm";
export async function GET() {
try {
const publicServices = await db.select({
id: services.id,
name: services.name,
description: services.description,
priceStatus: services.priceStatus,
joinLink: services.joinLink,
enabled: services.enabled
})
.from(services)
.where(eq(services.enabled, true))
.orderBy(services.name);
return Response.json({ services: publicServices });
} catch (error) {
console.error("Error fetching public services:", error);
return Response.json({ error: "Internal server error" }, { status: 500 });
}
}