From 944b6b0526032ad8c1b4a2612d6723bec75e0e4c Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Fri, 29 Mar 2024 22:29:56 -0400
Subject: start database (user and post), and initial barebones home page

---
 db/rest/post/api_post.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create 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
new file mode 100644
index 0000000..a91d9d2
--- /dev/null
+++ b/db/rest/post/api_post.sql
@@ -0,0 +1,13 @@
+CREATE VIEW api.post AS
+	SELECT
+		p.id,
+		p.user_id,
+		p.content,
+		p.date
+	FROM
+		admin.post p;
+
+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

