updated paths

This commit is contained in:
Peter Morton 2022-10-19 00:10:16 -05:00
parent 4b2be3144b
commit e63187165b
4 changed files with 9 additions and 8 deletions

1
.env
View File

@ -1,4 +1,3 @@
SERVER_PORT = 9000
EO_API_USERNAME = apiclient
EO_API_PASSWORD = apiclient12345
EO_API_SCOPE = oidc tags context_entitlements content_entitlements em_api_access

View File

@ -17,5 +17,5 @@ RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 9000
EXPOSE 3000
CMD [ "npm", "start" ]

View File

@ -39,9 +39,9 @@ app.listen(port, () => {
// Main Page
app.get("/", (req, res) => {
res.send({
message: "FusionAuth Example With Vue",
message: "Engagement Orchestration Services",
});
});
//...
app.use("/thread-tracker", require("./routes/threadTracker"));
app.use("/unified-data-gateway", require("./routes/unified-data-gateway"));

View File

@ -33,14 +33,14 @@ router.get("/", (req, res) => {
req.session.token = result.data.access_token;
console.log(result);
//redirect to Vue app
query(req.query.threadId);
query(req.query.referenceId);
})
.catch((err) => {
console.error(err);
});
}
function query(threadId) {
function query(referenceId) {
console.log("Executing Query");
var query = `query ($startTime: DateTime, $endTime: DateTime) {
@ -143,8 +143,10 @@ router.get("/", (req, res) => {
if (contact.node.interaction.__typename === "Email") {
// threadId if Reference in Subject line will do
if (
(contact.node.interaction.threadId === threadId) |
contact.node.interaction.subject.includes(`<< Ref:${threadId} >>`)
(contact.node.interaction.threadId === referenceId) |
contact.node.interaction.subject.includes(
`<< Ref:${referenceId} >>`
)
) {
filteredContacts.push(contact);
}