u
This commit is contained in:
@@ -2,33 +2,43 @@ import { http } from './http.js';
|
||||
|
||||
export const attributevalue = {
|
||||
/** GET /api/attributename/:attributeId/value → { values: AttributeValue[] } */
|
||||
// #region GET /api/attributename/:attributeId/value — listByAttributeId
|
||||
listByAttributeId(attributeId) {
|
||||
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value`);
|
||||
},
|
||||
// #endregion
|
||||
|
||||
/** POST /api/attributename/:attributeId/value → 201 { attributevalue } */
|
||||
// #region POST /api/attributename/:attributeId/value — create
|
||||
create(attributeId, body) {
|
||||
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value`, {
|
||||
method: 'POST',
|
||||
body,
|
||||
});
|
||||
},
|
||||
// #endregion
|
||||
|
||||
/** PATCH /api/attributevalue/:id → 200 { attributevalue } */
|
||||
// #region PATCH /api/attributevalue/:id — update
|
||||
update(id, body) {
|
||||
return http(`/api/attributevalue/${encodeURIComponent(id)}`, { method: 'PATCH', body });
|
||||
},
|
||||
// #endregion
|
||||
|
||||
/** DELETE /api/attributevalue/:id → 200 */
|
||||
// #region DELETE /api/attributevalue/:id — delete
|
||||
delete(id) {
|
||||
return http(`/api/attributevalue/${encodeURIComponent(id)}`, { method: 'DELETE' });
|
||||
},
|
||||
// #endregion
|
||||
|
||||
/** PUT /api/attributename/:attributeId/value/order → 200 */
|
||||
// #region PUT /api/attributename/:attributeId/value/order — order
|
||||
order(attributeId, attributevalueIds) {
|
||||
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value/order`, {
|
||||
method: 'PUT',
|
||||
body: { attributevalueIds },
|
||||
});
|
||||
},
|
||||
// #endregion
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user