mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 23:57:32 +00:00
replace axiosInstance in the Roles ListPage fetchData function to replace the api call with the getFetchClient get method
This commit is contained in:
parent
a76b557047
commit
c7ba51012e
@ -1,8 +1,10 @@
|
||||
import { getFetchClient } from '@strapi/admin/admin/src/utils/getFetchClient';
|
||||
import { getRequestURL, axiosInstance } from '../../../../utils';
|
||||
|
||||
export const fetchData = async (toggleNotification, notifyStatus) => {
|
||||
try {
|
||||
const { data } = await axiosInstance.get(getRequestURL('roles'));
|
||||
const { get } = getFetchClient();
|
||||
const { data } = await get(getRequestURL('roles'));
|
||||
notifyStatus('The roles have loaded successfully');
|
||||
|
||||
return data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user