From 9ed46c335d6020b10f720d9738b8252d424dd24c Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Mon, 1 Apr 2024 15:02:51 -0400
Subject: start custom banner and avatar loading

---
 src/db/rest/user/api_avatar.sql | 22 ----------------------
 1 file changed, 22 deletions(-)
 delete mode 100644 src/db/rest/user/api_avatar.sql

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

diff --git a/src/db/rest/user/api_avatar.sql b/src/db/rest/user/api_avatar.sql
deleted file mode 100644
index 981409f..0000000
--- a/src/db/rest/user/api_avatar.sql
+++ /dev/null
@@ -1,22 +0,0 @@
-CREATE FUNCTION api.avatar(
-	user_id INTEGER DEFAULT 0
-)
-RETURNS sys."*/*"
-LANGUAGE plpgsql VOLATILE
-AS $BODY$
-DECLARE
-	_mod INTEGER;
-	_name TEXT;
-BEGIN
-	_mod = MOD(user_id, 24);
-	_name = 'default_avatar_' || _mod || '.png';
-	RETURN _api.serve_media(_name);
-END
-$BODY$;
-
-GRANT EXECUTE ON FUNCTION api.avatar(INTEGER)
-	TO rest_anon, rest_user;
-GRANT SELECT ON TABLE admin.user
-	TO rest_anon, rest_user;
-GRANT SELECT ON TABLE admin.media
-	TO rest_anon, rest_user;
-- 
cgit v1.2.3-freya

