Skip to content

Commit

Permalink
PDR-224 updating current state to established (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronpettit authored Nov 29, 2023
1 parent 03dc0df commit 87329fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lambda/nameUpdate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 87329fc

Please sign in to comment.