Added authentication header and multi user support to the royalroad check

This commit is contained in:
florian committed 2026-10-30 13:02:36 +01:00
1 parent 5a2e1096de
commit 146c229e45
7 files changed
+113 -37

No files matched your search

+15 -5
View File
@@ -1,5 +1,15 @@
CREATE TABLE stories (id INT AUTO_INCREMENT PRIMARY KEY,
royalroadId INT NOT NULL,
lastChapter INT DEFAULT 0,
active BOOLEAN NOT NULL DEFAULT TRUE
);
CREATE TABLE `rss_feeds` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`type` enum('royalroad','gitea') COLLATE utf8mb4_unicode_ci NOT NULL,
`feed_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`rss_feed` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL,
`last_entry` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_rss_feed` (`rss_feed`),
UNIQUE KEY `uq_user_rss_feed` (`user_id`,`rss_feed`),
KEY `idx_active_type` (`active`,`type`),
CONSTRAINT `fk_rss_feeds_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
)