Skip to content
New issue

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

/api/note/updateNote: 更新 note 时没有更新该 note 的 Usn #865

Open
cnfn opened this Issue Mar 10, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@cnfn
Copy link

cnfn commented Mar 10, 2019

想为 leanote 写一个客户端, 其定位是让用户可使用自己喜欢的文本编辑器(例如 TyporaMark Text)更新 note. 其他操作(如新增 notebook/note/tag 等)还是要到 WEB 管理端或官方客户端来实现. 但在测试验证 API 时发现点问题.

通过 leanote 的后台管理界面更新 note 时, 会将全局最大的 Usn + 1 赋值给该 note.
但调用更新 note 接口 /api/note/updateNote 后, 返回数据中的 Usn是在全局最大的值的基础上+1, 但这时通过 /api/note/getNoteAndContent 得到该 note 的 Usn 仍旧是原值(调用更新 note 接口时传给服务端值), 也就是说, /api/note/updateNote 返回的 Usn 并没有在该 note 上生效.

如果这时候再在后台管理界面上更新 note 时, 其 Usn 会在上面更新 note 接口返回的 Usn 值上再+1, 这个逻辑是正确的. 目前看来是更新 note 的接口 /api/note/updateNote 只是返回了正确的 Usn 值, 并没有将其赋值给该 note.

请帮忙确认下, 谢谢~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.