import { createAsyncThunk } from '@reduxjs/toolkit';
import axios from 'axios';
import { User } from './types';

export const fetchUser = createAsyncThunk(
    'User/fetchUserStatus',
    async () => {
      const { data } = await axios.get<User[]>(`/api/loadingLegisteredCommands`);
      // eslint-disable-next-line no-console
      console.log(data);
      return data;
    },
  );