// /redux/thunks/database/pois/deletePoiThunk.js

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

export const deletePoiThunk = createAsyncThunk("poi/delete", async (id, thunkAPI) => {
  try {
    await deletePoiService(id);
    return id; // Falls du später ID-basiertes Entfernen im Store brauchst
  } catch (error) {
    return thunkAPI.rejectWithValue(error.message);
  }
});
