Skip to content

Commit

Permalink
Added: Update Status to webhook API
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyvishal committed Apr 9, 2024
1 parent 6f14f48 commit 0881955
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 83 deletions.
2 changes: 0 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import bodyParser from 'body-parser'
import logger from './utils/logger.js'
import messageController from './controllers/Bot.js'
import DBService from './services/DBService.js'
import {ORDER_DETAILS} from './utils/constants.js'
import {
cancelBooking,
updateCatalog,
Expand Down Expand Up @@ -41,7 +40,6 @@ export const db = new DBService()

await db.clear_all_sessions()

await db.set_data('orderDetails', ORDER_DETAILS)

// Start the Express server
app.listen(process.env.SERVER_PORT, () => {
Expand Down
81 changes: 0 additions & 81 deletions utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,87 +21,6 @@ export const UPDATE_STATUS_MESSAGE = {
ENERGY: 'charging-started',
TOURISM: 'ticket-purchased',
}
export const ORDER_DETAILS = {
domain: {
retail: {
orders: {
6:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
5:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
4:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
3:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
2:{
orderFulfillmentStatus: 'IN_PROGRESS',
}
},
},
hotel: {
orders: {
89:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
88:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
87:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
86:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
85:{
orderFulfillmentStatus: 'IN_PROGRESS',
}
},
},
tourism: {
orders:{
19:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
18:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
17:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
16:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
15:{
orderFulfillmentStatus: 'IN_PROGRESS',
}
},
},
energy: {
orders: {
34:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
33:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
32:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
31:{
orderFulfillmentStatus: 'IN_PROGRESS',
},
30:{
orderFulfillmentStatus: 'IN_PROGRESS',
}
}
}
}
}


export const BECKN_STATUS_CALL = {
"context": {
Expand Down

0 comments on commit 0881955

Please sign in to comment.