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
This commit is contained in:
Magnus-SmariSma
2025-03-20 23:34:20 +00:00
parent dbb21056c5
commit 953cc956ce

View File

@ -323,7 +323,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
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<Server> {
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}`
},