13 lines
372 B
JavaScript
13 lines
372 B
JavaScript
import apiClient from '../api/client';
|
|
import { normalizeChannelsPayload } from './businessProfile';
|
|
|
|
export async function fetchActiveSalesChannels() {
|
|
const response = await apiClient.get('/api/platform/sales-channels');
|
|
return normalizeChannelsPayload(
|
|
response?.data?.salesChannels
|
|
|| response?.data?.channels
|
|
|| response?.data?.items
|
|
|| []
|
|
);
|
|
}
|