Skip to content

Commit

Permalink
added check for timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurvir committed Apr 9, 2024
1 parent f312d50 commit 8406cc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions services/AI.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ class AI {
else delete responseMessage.intent.fulfillment.stops[0].location.polygon;

}
if(this.action?.action=='search' && responseMessage?.intent?.fulfillment?.stops && responseMessage?.intent?.fulfillment?.stops.length>0){
responseMessage?.intent?.fulfillment?.stops.map(stop=>{
if(stop?.time?.timestamp){
stop.time.timestamp = new Date('2024-04-12T12:00:00Z').toISOString();
}
})
}

return responseMessage
}
Expand Down

0 comments on commit 8406cc7

Please sign in to comment.