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`);
      console.log(data);
      return data;
    },
  );