Skip to content

Commit 1edf05e

Browse files
committedMar 14, 2025
Switching LTA API Token for deployment on render platform
1 parent f9199ac commit 1edf05e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎app.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ require("dotenv").config();
33
// ================== Part #1. Most variables and constants are declared here
44
const PORT = process.env.PORT || 3000;
55
const ORIGIN=process.env.ORIGIN || `http://localhost:${PORT}`;
6-
const LTA_API_KEY_BACKUP=process.env.LTA_API_KEY_BACKUP;
7-
// const LTA_API_KEY=process.env.LTA_API_KEY;
6+
// const LTA_API_KEY_BACKUP=process.env.LTA_API_KEY_BACKUP;
7+
const LTA_API_KEY=process.env.LTA_API_KEY;
88
const API_ENDPOINT = "https://datamall2.mytransport.sg/ltaodataservice";
99
// https://datamall2.mytransport.sg/ltaodataservice/BusStops
1010
// https://datamall2.mytransport.sg/ltaodataservice/v3/BusArrival
@@ -173,7 +173,7 @@ const connectedRedisClient = (connectedClient) => new Promise((resolve, reject)
173173
method: "GET",
174174
json: true,
175175
headers: {
176-
"AccountKey" : LTA_API_KEY_BACKUP,
176+
"AccountKey" : LTA_API_KEY,
177177
"accept" : "application/json"
178178
}
179179
};
@@ -261,7 +261,7 @@ const connectedRedisClient = (connectedClient) => new Promise((resolve, reject)
261261
method: "GET",
262262
json: true,
263263
headers: {
264-
"AccountKey" : LTA_API_KEY_BACKUP,
264+
"AccountKey" : LTA_API_KEY,
265265
"accept" : "application/json"
266266
}
267267
};
@@ -402,7 +402,7 @@ const connectedRedisClient = (connectedClient) => new Promise((resolve, reject)
402402
method: "GET",
403403
json: true,
404404
headers: {
405-
"AccountKey" : LTA_API_KEY_BACKUP,
405+
"AccountKey" : LTA_API_KEY,
406406
"accept" : "application/json"
407407
}
408408
}, (err, res, body) => {

0 commit comments

Comments
 (0)