fix: remove unused variables in main-axios.ts

Removed 8 unused variables:
- Removed unused type imports (Credential, CredentialData, HostInfo, ApiResponse)
- Removed unused apiPort variable
- Removed unused error variables in 3 catch blocks
This commit is contained in:
ZacharyZcR
2025-10-09 18:56:31 +08:00
parent 3b82a0b099
commit a5188cad0b

View File

@@ -4,10 +4,6 @@ import type {
SSHHostData,
TunnelConfig,
TunnelStatus,
Credential,
CredentialData,
HostInfo,
ApiResponse,
FileManagerFile,
FileManagerShortcut,
} from "../types/index.js";
@@ -339,13 +335,8 @@ function isDev(): boolean {
}
const apiHost = import.meta.env.VITE_API_HOST || "localhost";
let apiPort = 30001;
let configuredServerUrl: string | null = null;
if (isElectron()) {
apiPort = 30001;
}
export interface ServerConfig {
serverUrl: string;
lastUpdated: string;
@@ -991,7 +982,7 @@ export async function getFileManagerRecent(
`/file_manager/recent?hostId=${hostId}`,
);
return response.data || [];
} catch (error) {
} catch {
return [];
}
}
@@ -1028,7 +1019,7 @@ export async function getFileManagerPinned(
`/file_manager/pinned?hostId=${hostId}`,
);
return response.data || [];
} catch (error) {
} catch {
return [];
}
}
@@ -1065,7 +1056,7 @@ export async function getFileManagerShortcuts(
`/file_manager/shortcuts?hostId=${hostId}`,
);
return response.data || [];
} catch (error) {
} catch {
return [];
}
}