avoid various HTTP server issues with slashes by putting notePath into the body with POST

This commit is contained in:
zadam
2019-02-17 20:49:51 +01:00
parent a7fce33750
commit c1ce0c6b22
3 changed files with 4 additions and 6 deletions

View File

@@ -331,7 +331,7 @@ function addRecentNote(branchId, notePath) {
setTimeout(async () => {
// we include the note into recent list only if the user stayed on the note at least 5 seconds
if (notePath && notePath === getCurrentNotePath()) {
await server.put('recent-notes/' + branchId + '/' + encodeURIComponent(notePath));
await server.post('recent-notes', { branchId, notePath });
}
}, 1500);
}