10 lines
283 B
TypeScript
10 lines
283 B
TypeScript
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')
|
|
}
|