fix: omit empty message field in wiki update to avoid 500 error

This commit is contained in:
15972095207 2026-06-03 20:46:01 +08:00
parent 5cb6ea1cd1
commit 114aed603b
1 changed files with 3 additions and 1 deletions

View File

@ -125,9 +125,11 @@ func Shortcuts() []*common.Shortcut {
"projectId": projectID,
"pageName": name,
"title": name,
"message": ctx.Arg("message"),
"content_base64": base64.StdEncoding.EncodeToString([]byte(content)),
}
if msg := ctx.Arg("message"); msg != "" {
body["message"] = msg
}
return callWikiAPI(ctx, "PUT", "/wiki/open/updateWiki", body, nil)
},
},