fix(confluence): add body-format=storage to blogpost update GET request

Without this param, the Confluence v2 API does not return body content,
causing the fallback to erase existing content when only updating the title.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Waleed Latif
2026-02-26 13:57:34 -08:00
parent 04461de3ca
commit 399db331a2

View File

@@ -317,7 +317,7 @@ export async function PUT(request: NextRequest) {
}
// Fetch current blog post to get version number
const currentUrl = `https://api.atlassian.com/ex/confluence/${cloudId}/wiki/api/v2/blogposts/${blogPostId}`
const currentUrl = `https://api.atlassian.com/ex/confluence/${cloudId}/wiki/api/v2/blogposts/${blogPostId}?body-format=storage`
const currentResponse = await fetch(currentUrl, {
headers: {
Accept: 'application/json',