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
@@ -32,8 +32,10 @@ const batchRemoveSalesChannelsFromApiKey = async (
payload: { sales_channel_ids: string[] }
) => {
return postRequest<AdminApiKeyResponse>(
`/admin/api-keys/${id}/sales-channels/batch/remove`,
payload
`/admin/api-keys/${id}/sales-channels`,
{
remove: payload.sales_channel_ids,
}
)
}
@@ -42,8 +44,10 @@ const batchAddSalesChannelsFromApiKey = async (
payload: { sales_channel_ids: string[] }
) => {
return postRequest<AdminApiKeyResponse>(
`/admin/api-keys/${id}/sales-channels/batch/add`,
payload
`/admin/api-keys/${id}/sales-channels`,
{
add: payload.sales_channel_ids,
}
)
}