feat: prepare Zhinian desktop pilot
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-05-07 21:49:20 +08:00
parent cddaf37016
commit 0abc48189c
103 changed files with 10975 additions and 2049 deletions

View File

@@ -0,0 +1,26 @@
import type { IncomingMessage, ServerResponse } from 'http';
import type { HostApiContext } from '../context';
import { sendJson } from '../route-utils';
import {
ensureNianxxPlayServiceStarted,
getNianxxPlayServiceStatus,
} from '../../utils/nianxx-play-service';
export async function handleAppIntegrationRoutes(
req: IncomingMessage,
res: ServerResponse,
url: URL,
_ctx: HostApiContext,
): Promise<boolean> {
if (url.pathname === '/api/apps/nianxx-play/status' && req.method === 'GET') {
sendJson(res, 200, await getNianxxPlayServiceStatus());
return true;
}
if (url.pathname === '/api/apps/nianxx-play/start' && req.method === 'POST') {
sendJson(res, 200, await ensureNianxxPlayServiceStarted());
return true;
}
return false;
}