summaryrefslogtreecommitdiff
path: root/src/db/rest/follow/api_follow.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/rest/follow/api_follow.sql')
-rw-r--r--src/db/rest/follow/api_follow.sql15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/db/rest/follow/api_follow.sql b/src/db/rest/follow/api_follow.sql
new file mode 100644
index 0000000..c0a07e5
--- /dev/null
+++ b/src/db/rest/follow/api_follow.sql
@@ -0,0 +1,15 @@
+CREATE VIEW api.follow AS
+ SELECT
+ f.id,
+ f.follower_id,
+ f.followee_id,
+ f.value,
+ f.created,
+ f.modified
+ FROM
+ admin.follow f;
+
+GRANT SELECT ON TABLE api.follow
+ TO rest_anon, rest_user;
+GRANT SELECT ON TABLE admin.follow
+ TO rest_anon, rest_user;