feat: use new version endpoint to display api information

This commit is contained in:
2026-09-01 17:03:23 +02:00
parent 16405ec5f7
commit 8df92a470e
3 changed files with 61 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { API_BASE_URL, extractErrorMessage } from '@/api/http'
import type { VersionInfo } from '@/types/version'
export async function getVersionApi(): Promise<VersionInfo> {
const response = await fetch(`${API_BASE_URL}/version`)
if (!response.ok) {
throw new Error(await extractErrorMessage(response, 'Failed to load API version'))
}
return response.json()
}