MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / POST

Function POST

webapp/src/app/api/delete-image/route.ts:3–13  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

1import { cloudinary } from '@/lib/cloudinary';
2
3export async function POST(req: Request) {
4 const publicId = await req.json();
5
6 try {
7 await cloudinary.v2.uploader.destroy(publicId);
8 return new Response(null, { status: 200 });
9 } catch (err) {
10 console.error('Cloudinary delete failed', err);
11 return new Response("Failed to delete", { status: 500 });
12 }
13}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…