mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 13:32:23 +00:00
23 lines
497 B
JavaScript
23 lines
497 B
JavaScript
import { json } from "../http.mjs";
|
|
|
|
// Gap fill: version-check ping used by daemonHealthService.
|
|
export function handleVersion(ctx) {
|
|
const { method, url, res } = ctx;
|
|
|
|
if (/^\/version-check\/?(\?.*)?$/.test(url)) {
|
|
if (method === "GET" || method === "POST") {
|
|
json(res, 200, {
|
|
success: true,
|
|
data: {
|
|
ok: true,
|
|
serverVersion: "0.0.0-mock",
|
|
minClientVersion: "0.0.0",
|
|
},
|
|
});
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|