From 104341ddc4add57f83c58cb3fabb23b6fbfdd3e4 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 2 Nov 2025 00:00:35 +0900
Subject: wip

---
 backend/db/queries/feeds.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'backend/db/queries/feeds.sql')

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
-- 
cgit v1.2.3-70-g09d2

