// /redux/thunks/database/addPoiThunk.js
import { createAsyncThunk } from "@reduxjs/toolkit";
import { addPoiService } from "../../../services/database/addPoiService";

export const addPoiThunk = createAsyncThunk("poi/add", async (formData, thunkAPI) => {
  try {
    return await addPoiService(formData);
  } catch (error) {
    return thunkAPI.rejectWithValue(error.message);
  }
});
