From 1f647374a8cdf3bc5c2d29ff8be277b027925c8c Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Sat, 30 Mar 2024 16:36:54 -0400
Subject: post comments, refactor post loading, hide load more btn

---
 db/rest/comment/api_comment.sql | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 db/rest/comment/api_comment.sql

(limited to 'db/rest/comment/api_comment.sql')

diff --git a/db/rest/comment/api_comment.sql b/db/rest/comment/api_comment.sql
new file mode 100644
index 0000000..e50ca2f
--- /dev/null
+++ b/db/rest/comment/api_comment.sql
@@ -0,0 +1,15 @@
+CREATE VIEW api.comment AS
+	SELECT
+		c.id,
+		c.user_id,
+		c.post_id,
+		c.content,
+		c.date
+	FROM
+		admin.comment c
+	ORDER BY id ASC;
+
+GRANT SELECT ON TABLE api.comment
+	TO rest_anon, rest_user;
+GRANT SELECT ON TABLE admin.comment
+	TO rest_anon, rest_user;
-- 
cgit v1.2.3-freya

