forked from Gitlink/gitlink-cli
fix: omit empty message field in wiki update to avoid 500 error
This commit is contained in:
parent
5cb6ea1cd1
commit
114aed603b
|
|
@ -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)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue