w
This commit is contained in:
+6
-5
@@ -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,
|
||||
}),
|
||||
}],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user