From 3a82baec9d793edf81ac2b151b0f4d4159641375 Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Mon, 1 Apr 2024 11:09:25 -0400
Subject: login and register, liking on homepage

---
 db/rest/post/api_post.sql | 25 -------------------------
 1 file changed, 25 deletions(-)
 delete mode 100644 db/rest/post/api_post.sql

(limited to 'db/rest/post/api_post.sql')

diff --git a/db/rest/post/api_post.sql b/db/rest/post/api_post.sql
deleted file mode 100644
index 375f292..0000000
--- a/db/rest/post/api_post.sql
+++ /dev/null
@@ -1,25 +0,0 @@
-CREATE VIEW api.post AS
-	SELECT
-		p.id,
-		p.user_id,
-		p.content,
-		p.date,
-		COALESCE(c.cc, 0)
-			AS comment_count
-	FROM
-		admin.post p
-	LEFT JOIN (
-		SELECT
-			COUNT(c.id) as cc,
-			c.post_id
-		FROM
-			admin.comment c
-		GROUP BY
-			c.post_id
-	) c ON p.id = c.post_id
-	ORDER BY p.id DESC;
-
-GRANT SELECT ON TABLE api.post
-	TO rest_anon, rest_user;
-GRANT SELECT ON TABLE admin.post
-	TO rest_anon, rest_user;
-- 
cgit v1.2.3-freya

