Skip to content

Commit

Permalink
Item: Finish all create and update item page.
Browse files Browse the repository at this point in the history
  • Loading branch information
anjiajun39 committed Apr 21, 2023
1 parent cc479db commit ffa3339
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 151 deletions.
22 changes: 22 additions & 0 deletions src/api/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,25 @@ export async function createItem(data) {
data: data,
})
}

export async function getItemImages(id) {
return request({
url: `items/${id}/images/`,
method: 'get',
})
}

export async function createItemImage(id, data) {
return request({
url: `items/${id}/images/`,
method: 'post',
data: data,
})
}

export async function deleteAllItemImages(id) {
return request({
url: `items/${id}/images/`,
method: 'delete',
})
}
Loading

0 comments on commit ffa3339

Please sign in to comment.