From 7d2d76c57cae6ce65dd73d718cfc7c36a05289e7 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 29 Mar 2024 11:55:21 +0800 Subject: [PATCH] :bug: Fix arg check https://github.com/Yimien/plugin-memos-sync/issues/16 --- kernel/api/block_op.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/api/block_op.go b/kernel/api/block_op.go index 0e0b32cde..65d9a96a2 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 } }