Browse Source

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

Daniel 1 year ago
parent
commit
7d2d76c57c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      kernel/api/block_op.go

+ 2 - 2
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
 		}
 	}