feat (medicine-method): implement medicine method fetching

This commit is contained in:
Abizrh
2025-09-07 20:43:14 +07:00
parent c3c9154d0e
commit e640a6d44c
2 changed files with 19 additions and 7 deletions

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import { xfetch } from '~/composables/useXfetch'
export async function getMedicineMethods() {
const resp = await xfetch('/api/v1/medicine-method')
if (resp.success) {
return (resp.body as Record<string, any>).data
}
throw new Error('Failed to fetch medicine methods')
}