// /redux/thunks/database/pois/updatePoiThunk.js

import { createAsyncThunk } from "@reduxjs/toolkit";
import { updatePoiService } from "../../../../services/database/pois/updatePoiService";

export const updatePoiThunk = createAsyncThunk("pois/update", async (poi, thunkAPI) => {
  try {
    await updatePoiService(poi);
  } catch (error) {
    return thunkAPI.rejectWithValue(error.message);
  }
});
