mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(confluence): reject empty update body for space PUT
Return 400 when neither name nor description is provided for space update, instead of sending an empty body to the Confluence API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,13 @@ export async function PUT(request: NextRequest) {
|
||||
|
||||
const url = `https://api.atlassian.com/ex/confluence/${cloudId}/wiki/api/v2/spaces/${spaceId}`
|
||||
|
||||
if (!name && description === undefined) {
|
||||
return NextResponse.json(
|
||||
{ error: 'At least one of name or description is required for update' },
|
||||
{ status: 400 }
|
||||
)
|
||||
}
|
||||
|
||||
const updateBody: Record<string, unknown> = {}
|
||||
if (name) updateBody.name = name
|
||||
if (description !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user