From: Mint <> Date: Sun, 26 Feb 2023 22:08:33 +0000 (+0300) Subject: Handle it both sides X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c29326745b4523fc2ede619a02a4e7d3580d918b;p=fba.git Handle it both sides --- diff --git a/api.py b/api.py index 43967e4..d120688 100644 --- a/api.py +++ b/api.py @@ -136,13 +136,14 @@ def mutual(domains: list[str] = Query()): c = conn.cursor() c.execute( "SELECT block_level FROM blocks " \ - "WHERE ((blocker = :a OR blocker = :b) AND (blocked = :b OR blocked = :a OR blocked = :w)) " \ + "WHERE ((blocker = :a OR blocker = :b) AND (blocked = :b OR blocked = :a OR blocked = :aw OR blocked = :bw)) " \ "AND block_level = 'reject' " \ "LIMIT 1", { "a": domains[0], - "w": "*." + domains[0], "b": domains[1], + "aw": "*." + domains[0], + "bw": "*." + domains[1], }, ) res = c.fetchone()