fix: Standardize remaining batch methods and update FE calls (#7122)

This commit is contained in:
Stevche Radevski
2024-04-23 09:12:38 +00:00
committed by GitHub
parent ea14a3bd68
commit 9e3556686b
49 changed files with 851 additions and 611 deletions
@@ -53,8 +53,10 @@ async function batchAddCustomers(
payload: { customer_ids: { id: string }[] }
) {
return postRequest<AdminCustomerGroupResponse>(
`/admin/customer-groups/${id}/customers/batch/add`,
payload
`/admin/customer-groups/${id}/customers`,
{
add: payload.customer_ids,
}
)
}
@@ -63,8 +65,10 @@ async function batchRemoveCustomers(
payload: { customer_ids: { id: string }[] }
) {
return postRequest<AdminCustomerGroupResponse>(
`/admin/customer-groups/${id}/customers/batch/remove`,
payload
`/admin/customer-groups/${id}/customers`,
{
remove: payload.customer_ids,
}
)
}