From 953cc956cea886b7f551ce855d3e7bdfb7d82f59 Mon Sep 17 00:00:00 2001 From: Magnus-SmariSma <20734986-Magnus-SmariSma@users.noreply.replit.com> Date: Thu, 20 Mar 2025 23:34:20 +0000 Subject: [PATCH] Update IUCN Red List API endpoint to v4 Replit-Commit-Author: Agent Replit-Commit-Session-Id: e931b5ab-041b-42e7-baf1-50017869cef6 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/e19c6a51-7e4c-4bb8-a6a6-46dc00f0ec99/84f6ff7e-917a-4db8-bbd7-a6d3e935090c.jpg --- server/routes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes.ts b/server/routes.ts index 504996c..7b4e77c 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -323,7 +323,7 @@ export async function registerRoutes(app: Express): Promise { try { // Check if the API is working by hitting the version endpoint - const response = await axios.get("https://apiv4.iucnredlist.org/api/v4/information/api_version", { + const response = await axios.get("https://api.iucnredlist.org/api/v4/information/api_version", { headers: { "Authorization": `Bearer ${iucnToken}` } @@ -400,7 +400,7 @@ export async function registerRoutes(app: Express): Promise { try { // Use the v4 API with scientific name endpoint - const response = await axios.get("https://apiv4.iucnredlist.org/api/v4/taxa/scientific_name", { + const response = await axios.get("https://api.iucnredlist.org/api/v4/taxa/scientific_name", { headers: { "Authorization": `Bearer ${iucnToken}` },