From 87329fc4b358936e9c49a24c77766e55ac6d3c8c Mon Sep 17 00:00:00 2001 From: Cameron Pettit <71421099+cameronpettit@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:33:38 -0800 Subject: [PATCH] PDR-224 updating current state to established (#285) --- lambda/nameUpdate/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lambda/nameUpdate/index.js b/lambda/nameUpdate/index.js index 7bcb77d..af3d123 100644 --- a/lambda/nameUpdate/index.js +++ b/lambda/nameUpdate/index.js @@ -2,8 +2,9 @@ const axios = require('axios'); const AWS = require("aws-sdk"); const { runQuery, runScan, NAME_CACHE_TABLE_NAME, TABLE_NAME, ORCS_INDEX, dynamodb } = require("../dynamoUtil"); const { logger } = require('../logger'); -const DATA_REGISTER_NAME_ENDPOINT = process.env.DATA_REGISTER_NAME_ENDPOINT || 'https://zloys5cfvf.execute-api.ca-central-1.amazonaws.com/api/parks/names?status=current'; +const DATA_REGISTER_NAME_ENDPOINT = process.env.DATA_REGISTER_NAME_ENDPOINT || 'https://zloys5cfvf.execute-api.ca-central-1.amazonaws.com/api/parks/names?status=established'; const DATA_REGISTER_NAME_API_KEY = process.env.DATA_REGISTER_NAME_API_KEY; +const ESTABLISHED_STATE = 'established'; exports.handler = async (event, context) => { logger.info('Name Update') @@ -207,7 +208,7 @@ async function getDataRegisterRecords() { return await axios.get(encodeURI(DATA_REGISTER_NAME_ENDPOINT), { params: { - status: 'current' + status: ESTABLISHED_STATE }, headers: { 'Content-Type': 'application/json',