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

(limited to 'src/db/rest/login/api_login.sql')

diff --git a/src/db/rest/login/api_login.sql b/src/db/rest/login/api_login.sql
index 0cf0535..6f0ba1c 100644
--- a/src/db/rest/login/api_login.sql
+++ b/src/db/rest/login/api_login.sql
@@ -11,7 +11,7 @@ DECLARE
 	_token sys.JWT;
 BEGIN
 	SELECT role INTO _role
-		FROM admin.user u
+		FROM xssbook.user u
 		WHERE u.username = login.username
 		AND u.password = login.password;
 
@@ -23,7 +23,7 @@ BEGIN
 	END IF;
 
 	SELECT id INTO _user_id
-		FROM admin.user u
+		FROM xssbook.user u
 		WHERE u.username = login.username;
 
 	_token = _api.sign_jwt(
@@ -37,5 +37,5 @@ $BODY$;
 
 GRANT EXECUTE ON FUNCTION api.login(TEXT, TEXT)
 	TO rest_anon, rest_user;
-GRANT SELECT ON TABLE admin.user
+GRANT SELECT ON TABLE xssbook.user
 	TO rest_anon, rest_user;
-- 
cgit v1.2.3-freya

