what is the api to patch media, i have done this but getting internal error 500:
const updatedDoc = {
...doc,
status,
};
console.log("Updated Document with Status:", updatedDoc);
const statusResponse = await fetch(`/api/media/${docId}`, {
credentials: 'include',
method: 'PATCH',
body: JSON.stringify({ updatedDoc }),
headers: {
'Content-Type': 'application/json',
},
});