'use server';

import { revalidatePath } from 'next/cache';

export async function deleteBook(id: number) {
  await fetch(`http://localhost:3001/books/${id}`, {
    method: 'DELETE',
  });
  revalidatePath('/books');
}
