/* * Printedparts API client snippet. * * Paste this printedpartsApi block into frontend/src/api/index.js (next to the * other per-resource blocks). Then, in the generated PrintedpartsList, PrintedpartsDetail, * and PrintedpartsForm views, delete the local printedpartsApi const and import the shared * one instead: * * import { printedpartsApi } from '../../api' * * The scaffolded views ship with an identical inline client so they build and * run before you touch the shared api module. This file is NOT auto-merged into * api/index.js on purpose; that module is hand-maintained and shared. * * The create/update/delete calls assume matching POST/PUT/DELETE routes exist * on the backend. The scaffolded api/routes.py only ships list and get; add the * write endpoints when you wire up the form. */ export const printedpartsApi = { list(params = {}) { return api.get('/printedparts', { params }) }, get(itemId) { return api.get(`/printedparts/${itemId}`) }, create(data) { return api.post('/printedparts', data) }, update(itemId, data) { return api.put(`/printedparts/${itemId}`, data) }, remove(itemId) { return api.delete(`/printedparts/${itemId}`) } }