summaryrefslogtreecommitdiff
path: root/src/db/rest/post/api_post.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/rest/post/api_post.sql')
-rw-r--r--src/db/rest/post/api_post.sql10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/db/rest/post/api_post.sql b/src/db/rest/post/api_post.sql
index b5c42a8..5796a19 100644
--- a/src/db/rest/post/api_post.sql
+++ b/src/db/rest/post/api_post.sql
@@ -10,13 +10,13 @@ CREATE VIEW api.post AS
COALESCE(l.lc, 0)
AS like_count
FROM
- admin.post p
+ xssbook.post p
LEFT JOIN (
SELECT
COUNT(c.id) as cc,
c.post_id
FROM
- admin.comment c
+ xssbook.comment c
GROUP BY
c.post_id
) c
@@ -27,14 +27,14 @@ CREATE VIEW api.post AS
COUNT(l.id) as lc,
l.post_id
FROM
- admin.like l
+ xssbook.like l
GROUP BY
l.post_id
) l
ON
p.id = l.post_id
LEFT JOIN
- admin.user u
+ xssbook.user u
ON
u.id = p.user_id
WHERE
@@ -46,5 +46,5 @@ CREATE VIEW api.post AS
GRANT SELECT ON TABLE api.post
TO rest_anon, rest_user;
-GRANT SELECT ON TABLE admin.post
+GRANT SELECT ON TABLE xssbook.post
TO rest_anon, rest_user;