-
Yusuf Akgül authoredYusuf Akgül authored
delete-gweet.ts 260 B
export const deleteGweet = async (gweetId: string) => {
try {
const data = await fetch(`/api/gweets?id=${gweetId}`, {
method: 'DELETE'
}).then((result) => result.json());
return data;
} catch (error: any) {
console.log(error);
}
};