aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-07-30 15:35:27 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-07-30 15:35:27 +0000
commitf6c219ecc27c58fd88d610c16b07f019c7929904 (patch)
treeb8bcc51f68015e83133cd1e24a10a0e8280a44b1 /static
parent24db878f08b150d2b61d4074374805550785700b (diff)
downloadtagrss-f6c219ecc27c58fd88d610c16b07f019c7929904.tar
tagrss-f6c219ecc27c58fd88d610c16b07f019c7929904.tar.gz
tagrss-f6c219ecc27c58fd88d610c16b07f019c7929904.zip
Make feed id autoincrement
This is necessary to avoid a condition where the most recently added feed is deleted, and a new one subsequently added, after the latest id has been fetched from the database for updating but before the new entries are inserted. In this case, without autoincrement, entries from the deleted feed would be associated with the newly added feed. This fix does not include migration from the old DB schema without the change since this project is not stable yet, but I intend to start including such migrations in perhaps the very next release that alters the database schema.
Diffstat (limited to 'static')
-rw-r--r--static/scripts/auto_refresh.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/static/scripts/auto_refresh.js b/static/scripts/auto_refresh.js
index 48af816..5e7223e 100644
--- a/static/scripts/auto_refresh.js
+++ b/static/scripts/auto_refresh.js
@@ -1,7 +1,7 @@
(() => {
const onFrontPage = () => {
const searchParams = new URLSearchParams(window.location.search);
- let pageNum = searchParams.get("page_num");
+ const pageNum = searchParams.get("page_num");
return (pageNum === "1") || (pageNum === null);
};