Skip to content

Commit

Permalink
Updated Material Integration
Browse files Browse the repository at this point in the history
Includes List All Material Code
  • Loading branch information
Joshua Wereley authored and Joshua Wereley committed Jun 22, 2024
1 parent c789980 commit a542250
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/client/src/lib/services/materials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,13 @@ export async function deleteMaterial(id: string): Promise<string> {
} catch (error) {
throw new Error('Delete Material Failed');
}
}

export async function listAllMaterial() {
try {
const response = await axios.get(`http://localhost:3000/materials`);
return response.data;
} catch (error) {
throw new Error('List All Material Failed');
}
}

0 comments on commit a542250

Please sign in to comment.