From 757ccac0103541a34d040ef4812b2e7afb9f1f02 Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Fri, 20 Dec 2024 00:30:08 -0500
Subject: rename admin schema to xssbook

---
 src/db/rest/media/api_update_user_media.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/db/rest/media/api_update_user_media.sql')

diff --git a/src/db/rest/media/api_update_user_media.sql b/src/db/rest/media/api_update_user_media.sql
index be8835a..a2d8f5c 100644
--- a/src/db/rest/media/api_update_user_media.sql
+++ b/src/db/rest/media/api_update_user_media.sql
@@ -1,5 +1,5 @@
 CREATE FUNCTION api.update_user_media(
-	media_type admin.user_media_type,
+	media_type xssbook.user_media_type,
 	mime TEXT,
 	content TEXT
 )
@@ -13,7 +13,7 @@ BEGIN
 	_user_id = _api.get_user_id();
 	_data = decode(content, 'base64');
 
-	INSERT INTO admin.user_media (
+	INSERT INTO xssbook.user_media (
 		user_id,
 		content,
 		mime,
@@ -33,9 +33,9 @@ BEGIN
 END
 $BODY$;
 
-GRANT EXECUTE ON FUNCTION api.update_user_media(admin.user_media_type, TEXT, TEXT)
+GRANT EXECUTE ON FUNCTION api.update_user_media(xssbook.user_media_type, TEXT, TEXT)
 	TO rest_user;
-GRANT INSERT, UPDATE ON TABLE admin.user_media
+GRANT INSERT, UPDATE ON TABLE xssbook.user_media
 	TO rest_user;
 GRANT UPDATE ON TABLE sys.user_media_id_seq
 	TO rest_user;
-- 
cgit v1.2.3-freya

