// /redux/thunks/webservice/fetchUserRightsThunk.js
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchUserRightsService } from "../../../services/webservice/fetchUserRightsService";

export const fetchUserRightsThunk = createAsyncThunk("userRights/fetch", async (_, thunkAPI) => {
  try {
    return await fetchUserRightsService();
  } catch (error) {
    return thunkAPI.rejectWithValue(error.message);
  }
});
