This commit is contained in:
seb
2026-10-10 00:39:23 +02:00
parent 2c36a705c4
commit ff54fe3a18
30 changed files with 2250 additions and 2256 deletions

34
src/api/attributevalue.js Normal file
View File

@@ -0,0 +1,34 @@
import { http } from './http.js';
export const attributevalue = {
/** GET /api/attributename/:attributeId/value → { values: AttributeValue[] } */
listByAttributeId(attributeId) {
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value`);
},
/** POST /api/attributename/:attributeId/value → 201 { attributevalue } */
create(attributeId, body) {
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value`, {
method: 'POST',
body,
});
},
/** PATCH /api/attributevalue/:id → 200 { attributevalue } */
update(id, body) {
return http(`/api/attributevalue/${encodeURIComponent(id)}`, { method: 'PATCH', body });
},
/** DELETE /api/attributevalue/:id → 200 */
delete(id) {
return http(`/api/attributevalue/${encodeURIComponent(id)}`, { method: 'DELETE' });
},
/** PUT /api/attributename/:attributeId/value/order → 200 */
order(attributeId, attributevalueIds) {
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value/order`, {
method: 'PUT',
body: { attributevalueIds },
});
},
};