import axios, { AxiosError } from 'axios'; import { Note, PipelineItem } from '@/types'; import { toast } from 'vue-sonner'; const API_URL = '/api/pipeline'; const ITEMS_API_URL = '/api/pipelineItems'; export default { /** * Deletes an item by ID * @param id - The id of the item to delete * @returns boolean - True if the item was deleted, false otherwise */ async deletePipelineItem(id: number): Promise { try { const response = await axios.delete(`${ITEMS_API_URL}/${id}`); return true; } catch (error) { toast.error('Fehler beim Löschen des Vorgangs', { description: (error as AxiosError).message }) console.error(error) return false; } }, };