add achats import and hardware analyse
This commit is contained in:
17
frontend/composables/useVersions.ts
Normal file
17
frontend/composables/useVersions.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export const useVersions = async () => {
|
||||
const { apiBase } = useApi()
|
||||
|
||||
const frontend = '0.1.0'
|
||||
let backend = 'unknown'
|
||||
|
||||
try {
|
||||
const data = await $fetch<{ version?: string }>(`${apiBase}/healthz`)
|
||||
if (data?.version) {
|
||||
backend = data.version
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
|
||||
return { frontend, backend }
|
||||
}
|
||||
Reference in New Issue
Block a user