Skip to content

Commit

Permalink
fix syntax error in function
Browse files Browse the repository at this point in the history
  • Loading branch information
swizzard committed May 2, 2020
1 parent 830669b commit 3d9d449
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/migrations/0002-functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $$ LANGUAGE plpgsql VOLATILE;
CREATE OR REPLACE FUNCTION delete_user(email VARCHAR(255), u_ipaddr inet) RETURNS boolean AS $$
DECLARE u record;
BEGIN
IF SELECT ip_banned(u_ipaddr) THEN
IF ip_banned(u_ipaddr) THEN
RETURN false;
ELSE
SELECT p.* INTO u FROM player p WHERE p.email = email;
Expand All @@ -42,7 +42,8 @@ BEGIN
DELETE FROM player p WHERE p.id = u.id;
RETURN true;
END IF;
END;
END IF;
END;
$$ LANGUAGE plpgsql VOLATILE;

CREATE OR REPLACE FUNCTION draft_game(data json) RETURNS integer AS $$
Expand Down

0 comments on commit 3d9d449

Please sign in to comment.