Files
simrsx-fe/app/services/source-material.service.ts
T

10 lines
276 B
TypeScript

import { xfetch } from '~/composables/useXfetch'
export async function getSourceMaterials() {
const resp = await xfetch('/api/v1/material')
if (resp.success) {
return (resp.body as Record<string, any>).data
}
throw new Error('Failed to fetch source materials')
}