Unverified Commit 07094aab authored by Reinaldo Neto's avatar Reinaldo Neto Committed by GitHub
Browse files

Chore: Migrate REST API - getServerInfo to Typescript (#3900)

parent ee336a84
......@@ -379,7 +379,7 @@ async function getServerInfo(server: string) {
const response = await RNFetchBlob.fetch('GET', `${server}/api/info`, { ...RocketChatSettings.customHeaders });
try {
// Try to resolve as json
const jsonRes = response.json();
const jsonRes: { version?: string; success: boolean } = response.json();
if (!jsonRes?.success) {
return {
success: false,
......
......@@ -18,7 +18,7 @@ const methods = {
};
export const compareServerVersion = (
currentServerVersion: string | null,
currentServerVersion: string | null | undefined,
method: keyof typeof methods,
versionToCompare: string
): boolean =>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment