diff --git a/app/api/ping/route.ts b/app/api/ping/route.ts new file mode 100644 index 0000000..d7f3f82 --- /dev/null +++ b/app/api/ping/route.ts @@ -0,0 +1,13 @@ +import { NEXT_API_VERSION, SPARKHOME_VERSION, CLIENT_VERSION } from "@/lib/version"; + +export const dynamic = "force-dynamic"; // defaults to auto +export async function GET(request: Request) { + const time = new Date().getTime() / 1000; + const responseString = +`SparkHome ${SPARKHOME_VERSION} +Client ${CLIENT_VERSION} +API ${NEXT_API_VERSION} +ServerTime ${time} +Powered by alikia2x (∠・ω< )⌒★`; + return new Response(responseString); +} diff --git a/lib/version.ts b/lib/version.ts new file mode 100644 index 0000000..5862b08 --- /dev/null +++ b/lib/version.ts @@ -0,0 +1,3 @@ +export const SPARKHOME_VERSION="4.6.2"; +export const CLIENT_VERSION="4.6.2"; +export const NEXT_API_VERSION="4.6.2"; \ No newline at end of file