Electrically tunable detector of THz-frequency signals based on an antiferromagnet