This commit is contained in:
2026-07-09 02:19:40 +03:00
parent 9697d8724d
commit 653eaecf2e
3 changed files with 17 additions and 16 deletions
+6 -5
View File
@@ -26,11 +26,11 @@ export function registerAuthTools(server: McpServer): void {
};
const client = new EwsClient(config);
const ok = await client.verifyConnection();
const result = await client.verifyConnection();
if (!ok) {
if (!result.ok) {
return {
content: [{ type: "text" as const, text: JSON.stringify({ success: false, error: "Connection verification failed. Check credentials and server URL." }) }],
content: [{ type: "text" as const, text: JSON.stringify({ success: false, error: result.error ?? "Connection verification failed" }) }],
};
}
@@ -57,15 +57,16 @@ export function registerAuthTools(server: McpServer): void {
try {
const config = loadConfig();
const client = new EwsClient(config);
const ok = await client.verifyConnection();
const result = await client.verifyConnection();
return {
content: [{
type: "text" as const,
text: JSON.stringify({
authenticated: ok,
authenticated: result.ok,
email: config.email,
serverUrl: config.serverUrl,
error: result.error,
}),
}],
};