fixed a bit

This commit is contained in:
bobbert committed 2025-03-11 21:51:28 +00:00
1 parent 26869d790e
commit 45b0f98971
4 files changed
+78

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { queryOne } from "../../../lib/db";
export async function GET() {
try {
const settings = await queryOne("SELECT active FROM hunt_settings LIMIT 1");
return Response.json({
active: settings ? Boolean(settings.active) : false,
});
} catch (error) {
console.error("Get hunt status error:", error);
return Response.json(
{ error: "Failed to fetch hunt status" },
{ status: 500 }
);
}
}