We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moveBlock
previousID
经过测试,在使用 Move API 的时候,如果 previousID 的类型为 doc,可能会导致需要移动的块直接丢失。
测试样例如下:
def request(route, data, token=GLOBAL_TOKEN): headers = { "Authorization": f"Token {token}", "Content-Type": "application/json", } response = requests.post(base_url + route, headers=headers, data=json.dumps(data)) if response.ok: return response.json() else: return None def moveBlock(id, previousID=None, parentID=None): data = { "id": id, "previousID": previousID, "parentID": parentID } return request('/api/block/moveBlock', data)
准备测试环境
测试移动
src = '20230415154400-wum1b1x' dst = '20230415142506-jtkp8vu' moveBlock(src, previousID=dst)
{'code': 0, 'msg': '', 'data': [{'doOperations': [{'action': 'move', 'data': None, 'id': '20230415154400-wum1b1x', 'parentID': '', 'previousID': '20230415142506-jtkp8vu', 'nextID': '', 'retData': None, 'blockIDs': None, 'deckID': '', 'srcIDs': None, 'name': '', 'type': ''}], 'undoOperations': None}]}
可以抛出错误甚至软件崩溃都在可接受范围内,但是不能无声无息直接把块弄没了,什么提示也没有。
No response
- Version: 2.8.4 - Operating System: Windows 10 - Browser (if used): 无,使用的是思源桌面版
Log 文件什么反应也没有
I 2023/04/15 16:00:40 repository.go:1077: synced data repo [provider=0, ufc=1, dfc=1, ucc=1, dcc=0, ub=44 kB, db=82 kB] in [1.52s] I 2023/04/15 16:08:41 repository.go:1077: synced data repo [provider=0, ufc=0, dfc=1, ucc=0, dcc=0, ub=0 B, db=82 kB] in [0.23s] I 2023/04/15 16:14:04 repository.go:1077: synced data repo [provider=0, ufc=1, dfc=1, ucc=1, dcc=0, ub=44 kB, db=82 kB] in [1.56s] I 2023/04/15 16:15:25 repository.go:1077: synced data repo [provider=0, ufc=1, dfc=1, ucc=1, dcc=0, ub=44 kB, db=82 kB] in [1.45s]
The text was updated successfully, but these errors were encountered:
🎨 Check the validity of the API moveBlock parameter previousID Fix …
5014a92
…#8007
88250
No branches or pull requests
Is there an existing issue for this?
Can the issue be reproduced with the default theme (daylight/midnight)?
Could the issue be due to extensions?
Describe the problem
经过测试,在使用 Move API 的时候,如果 previousID 的类型为 doc,可能会导致需要移动的块直接丢失。
测试样例如下:
准备测试环境
测试移动
Expected result
可以抛出错误甚至软件崩溃都在可接受范围内,但是不能无声无息直接把块弄没了,什么提示也没有。
Screenshot or screen recording presentation
No response
Version environment
Log file
Log 文件什么反应也没有
More information
No response
The text was updated successfully, but these errors were encountered: