Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Fix arg check https://github.com/Yimien/plugin-memos-sync/issues/16

Daniel7d2d76c57cae
diff --git a/kernel/api/block_op.go b/kernel/api/block_op.go
index 0e0b32cdea..65d9a96a2a 100644
--- a/kernel/api/block_op.go
+++ b/kernel/api/block_op.go
@@ -418,13 +418,13 @@ func insertBlock(c *gin.Context) {
}
if nil != arg["previousID"] {
previousID = arg["previousID"].(string)
- if "" != previousID && util.InvalidIDPattern(parentID, ret) {
+ if "" != previousID && util.InvalidIDPattern(previousID, ret) {
return
}
}
if nil != arg["nextID"] {
nextID = arg["nextID"].(string)
- if "" != nextID && util.InvalidIDPattern(parentID, ret) {
+ if "" != nextID && util.InvalidIDPattern(nextID, ret) {
return
}
}