Files
dashfront/src/api/attributename.js
2026-10-10 18:17:14 +02:00

39 lines
1.2 KiB
JavaScript

import { http } from './http.js';
export const attributename = {
/** GET /api/attributename → { attributenames: Attributename[] } */
// #region GET /api/attributename — list
list() {
return http('/api/attributename');
},
// #endregion
/** POST /api/attributename → 201 { attributename } */
// #region POST /api/attributename — create
create(body) {
return http('/api/attributename', { method: 'POST', body });
},
// #endregion
/** PATCH /api/attributename/:id → 200 { attributename } */
// #region PATCH /api/attributename/:id — update
update(id, body) {
return http(`/api/attributename/${encodeURIComponent(id)}`, { method: 'PATCH', body });
},
// #endregion
/** DELETE /api/attributename/:id → 200 */
// #region DELETE /api/attributename/:id — delete
delete(id) {
return http(`/api/attributename/${encodeURIComponent(id)}`, { method: 'DELETE' });
},
// #endregion
/** PUT /api/attributename/order → 200 */
// #region PUT /api/attributename/order — order
order(attributenameIds) {
return http('/api/attributename/order', { method: 'PUT', body: { attributenameIds } });
},
// #endregion
};