summaryrefslogtreecommitdiff
path: root/src/db/rest/media/api_profile_banner.sql
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-04-01 15:02:51 -0400
committerFreya Murphy <freya@freyacat.org>2024-04-01 15:02:51 -0400
commit9ed46c335d6020b10f720d9738b8252d424dd24c (patch)
treefd8751ebf01472d16c6f1bb00797ba921a246d3f /src/db/rest/media/api_profile_banner.sql
parentlogin and register, liking on homepage (diff)
downloadxssbook2-9ed46c335d6020b10f720d9738b8252d424dd24c.tar.gz
xssbook2-9ed46c335d6020b10f720d9738b8252d424dd24c.tar.bz2
xssbook2-9ed46c335d6020b10f720d9738b8252d424dd24c.zip
start custom banner and avatar loading
Diffstat (limited to 'src/db/rest/media/api_profile_banner.sql')
-rw-r--r--src/db/rest/media/api_profile_banner.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/db/rest/media/api_profile_banner.sql b/src/db/rest/media/api_profile_banner.sql
new file mode 100644
index 0000000..272d021
--- /dev/null
+++ b/src/db/rest/media/api_profile_banner.sql
@@ -0,0 +1,13 @@
+CREATE FUNCTION api.profile_banner(
+ user_id INTEGER DEFAULT 0
+)
+RETURNS sys."*/*"
+LANGUAGE plpgsql VOLATILE
+AS $BODY$
+BEGIN
+ PERFORM _api.raise_deny();
+END
+$BODY$;
+
+GRANT EXECUTE ON FUNCTION api.profile_banner(INTEGER)
+ TO rest_anon, rest_user;