structure: backend API
This commit is contained in:
parent
b3255de375
commit
8a9ef8fcb4
13
app/api/ping/route.ts
Normal file
13
app/api/ping/route.ts
Normal file
@ -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);
|
||||
}
|
3
lib/version.ts
Normal file
3
lib/version.ts
Normal file
@ -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";
|
Loading…
Reference in New Issue
Block a user