Merge branch 'master' into meilisearch
This commit is contained in:
commit
c9f901d6a3
|
@ -15,6 +15,7 @@ export async function listIndexInstancesHost (): Promise<string[]> {
|
|||
}
|
||||
|
||||
export async function getMajorInstanceVersion (host: string): Promise<number> {
|
||||
try {
|
||||
const { body } = await doRequest<any>({ uri: `https://${host}/api/v1/config`, json: true })
|
||||
|
||||
const version = body.serverVersion
|
||||
|
@ -24,4 +25,7 @@ export async function getMajorInstanceVersion (host: string): Promise<number> {
|
|||
return isNaN(majorVersion)
|
||||
? 0
|
||||
: majorVersion
|
||||
} catch {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue