Unverified Commit e5dd07d8 authored by Guillermo Sanz López's avatar Guillermo Sanz López Committed by GitHub
Browse files

Merge pull request #9 from Telefonica/fix-502

change /apis for /services
parents 7082c9cb 54e08aae
Loading
Loading
Loading
Loading
+0 −51
Original line number Diff line number Diff line
@@ -233,54 +233,6 @@ export const deleteProvidersServices = async (selectedApis) => {
  }
};

// DELETE multiple apis
// export const deleteProvidersServices = async apis => {
//   try {
//     const data = {
//       api: apis.map(({ apf_id, api_id }) => ({ apf_id, api_id }))
//     };

//     const response = await axiosInstance.delete('/apis/', {
//       headers: {
//         'Content-Type': 'application/json'
//       },
//       data: {
//         api: selectedApis,
//       },
//     });

//     return response.data; // Retorna los datos de la respuesta si la solicitud fue exitosa
//   } catch (error) {
//     throw error; // Lanza un error si la solicitud no fue exitosa
//   }
// };

// DELETE multiple apis
// const deleteApis = async (selectedApis) => {
//   try {
//     const response = await axiosInstance.delete('/apis/', {
      // data: {
      //   api: selectedApis,
      // },
//     });

//     return response.data;
//   } catch (error) {
//     console.error('Error deleting APIs:', error.response ? error.response.data : error.message);
//     throw error;
//   }
// };







// USERS
// export const getUsers = async id => {
//   return axiosInstance.get(`/users/?page=1&pageSize=10&order=asc`)
// }

export const getUsers = async () => {
  const response = await axiosInstance.get(`/users/?page=1&pageSize=10&order=asc`);
@@ -340,9 +292,6 @@ export const getUser = async (uuid) => {
  }
}

// export const getUser = async name => {
//   return axiosInstance.get(`/users/${name}`)
// }

export const getNumUsers1 = async () => {
  return axiosInstance.get(`/users/numUsers`)
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ const navigation = () => {
    {
      title: 'APIs',
      icon: 'mdi:baseline-people',
      path: '/apis'
      path: '/services'
    },
    {
      title: 'Users',
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ const Homedash = () => {
              width: '100%',
            }}
          >
            <LinkStyled href="/apis">
            <LinkStyled href="/services">
              <Button
                style={{ textDecoration: 'none', width: '100%' }}
                sx={{
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ const Apis = () => {
                      />
                    </TableCell>
                    <TableCell>
                      <LinkStyled href={`/apis/${api.api_id}`}>{api.api_name}</LinkStyled>
                      <LinkStyled href={`/services/${api.api_id}`}>{api.api_name}</LinkStyled>
                    </TableCell>
                    <TableCell>{api.description}</TableCell>
                    <TableCell>{api.aef_profiles[0]?.aef_id}</TableCell>