u
This commit is contained in:
34
src/api/attributevalue.js
Normal file
34
src/api/attributevalue.js
Normal 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 },
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user