From 878c423340243113c7ee629a7f65c7d4f89e9a09 Mon Sep 17 00:00:00 2001 From: Georgi 7DIGIT Date: Mon, 13 May 2024 14:53:50 +0300 Subject: [PATCH] Fix: duplicate country results --- service/queries/countries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/queries/countries.js b/service/queries/countries.js index 9c64c43..9b82aa2 100644 --- a/service/queries/countries.js +++ b/service/queries/countries.js @@ -3,7 +3,7 @@ import { getDBPool } from "#utils/dbConfig"; export const getAllActiveCountries = async () => await getDBPool("masterDb").query( ` - SELECT "country"."country_id", + SELECT DISTINCT("country"."country_id"), "country"."name", "country"."alpha2", "country"."alpha3",