aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/db/queries/feeds.sql
diff options
context:
space:
mode:
Diffstat (limited to 'backend/db/queries/feeds.sql')
-rw-r--r--backend/db/queries/feeds.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/db/queries/feeds.sql b/backend/db/queries/feeds.sql
index 9725252..9b0b8f7 100644
--- a/backend/db/queries/feeds.sql
+++ b/backend/db/queries/feeds.sql
@@ -1,12 +1,12 @@
-- name: GetFeed :one
SELECT id, url, title, fetched_at, is_subscribed, user_id
FROM feeds
-WHERE id = ?;
+WHERE id = ? AND user_id = ?;
-- name: GetFeeds :many
SELECT id, url, title, fetched_at, is_subscribed, user_id
FROM feeds
-WHERE is_subscribed = 1
+WHERE is_subscribed = 1 AND user_id = ?
ORDER BY id;
-- name: CreateFeed :one
@@ -26,7 +26,7 @@ WHERE id = ?;
-- name: GetFeedByURL :one
SELECT id, url, title, fetched_at, is_subscribed, user_id
FROM feeds
-WHERE url = ?;
+WHERE url = ? AND user_id = ?;
-- name: GetFeedsToFetch :many
SELECT id, url, fetched_at, user_id