mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-08 03:50:21 +00:00
17 lines
439 B
JavaScript
17 lines
439 B
JavaScript
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 }
|
|
);
|
|
}
|
|
}
|