Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Commit d24b4f3

Browse files
author
Vianpyro
committed
Refactor SQL functions: clean up syntax and remove unused function
1 parent 13da952 commit d24b4f3

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

database/functions/disable_2fa.sql

Lines changed: 0 additions & 8 deletions
This file was deleted.

database/functions/get_used_discriminators.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ BEGIN
66
RETURN QUERY
77
SELECT discriminator
88
FROM users
9-
WHERE users.username = p_username;
9+
WHERE username = p_username;
1010
END;
1111
$$ LANGUAGE plpgsql;

database/functions/get_user_2fa_secret.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
-- Get the user's authentication methods secret
2-
CREATE OR REPLACE FUNCTION get_user_authentication_method_secret(p_user_id UUID) RETURNS TABLE (method TEXT, secret TEXT) AS $$
2+
CREATE OR REPLACE FUNCTION get_user_authentication_method_secret(
3+
p_user_id UUID
4+
)
5+
RETURNS TABLE (
6+
method TEXT,
7+
secret TEXT
8+
) AS $$
39
BEGIN
410
RETURN QUERY
511
SELECT authentication_method, user_authentication_method_secret

database/functions/get_user_2fa_secret_by_user_id.sql renamed to database/functions/get_user_2fa_secret_by_email_hash.sql

File renamed without changes.

0 commit comments

Comments
 (0)