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/user/api_user_update.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/db/rest/user/api_user_update.sql')

diff --git a/src/db/rest/user/api_user_update.sql b/src/db/rest/user/api_user_update.sql
index c26c680..27b9042 100644
--- a/src/db/rest/user/api_user_update.sql
+++ b/src/db/rest/user/api_user_update.sql
@@ -24,7 +24,7 @@ BEGIN
 	);
 
 	IF NEW.username IS DISTINCT FROM OLD.username THEN
-		PERFORM TRUE FROM admin.user
+		PERFORM TRUE FROM xssbook.user
 			WHERE username = NEW.username;
 		IF FOUND THEN
 			PERFORM _api.raise_unique('username');
@@ -117,7 +117,7 @@ BEGIN
 	END IF;
 
 	IF _changed THEN
-		UPDATE admin.user SET
+		UPDATE xssbook.user SET
 			username = NEW.username,
 			first_name = NEW.first_name,
 			last_name = NEW.last_name,
@@ -138,7 +138,7 @@ GRANT EXECUTE ON FUNCTION _api.user_update()
 	TO rest_user;
 GRANT UPDATE ON TABLE api.user
 	TO rest_user;
-GRANT UPDATE ON TABLE admin.user
+GRANT UPDATE ON TABLE xssbook.user
 	TO rest_user;
 
 CREATE TRIGGER api_user_update_trgr
-- 
cgit v1.2.3-freya

