/* eslint-disable import/no-unresolved */
/* eslint-disable import/order */


import { sageService } from '@/service/sageService';
import { UserInterface } from '@/types/userInterface';
import { createAsyncThunk } from '@reduxjs/toolkit';


/**
 * user auth
 */
export const authMe = createAsyncThunk(
  'user/authMe',
  async (): Promise<UserInterface> => {
    try {
      return await sageService.authMe();
    } catch (err) {
      throw err;
    }
  }
);

