Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
node_crisp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web
node_crisp
Commits
cc3821c1
Commit
cc3821c1
authored
Aug 30, 2021
by
Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agrega llamada a handlers de turnos bajo demanda
parent
9cf8f274
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
index.js
index.js
+8
-0
No files found.
index.js
View file @
cc3821c1
const
axios
=
require
(
'axios'
);
const
axios
=
require
(
'axios'
);
const
config
=
require
(
'config'
);
const
config
=
require
(
'config'
);
const
handlerTurnosProgramados
=
require
(
'./handlers/is_turnos_programados.js'
);
const
handlerTurnosProgramados
=
require
(
'./handlers/is_turnos_programados.js'
);
const
handlerTurnosBajoDemanda
=
require
(
'./handlers/ips_turnos_bajo_demanda'
);
const
crisp
=
require
(
'./crisp.js'
);
const
crisp
=
require
(
'./crisp.js'
);
const
utils
=
require
(
'./utils.js'
);
const
utils
=
require
(
'./utils.js'
);
const
pasosTurnosProgramados
=
require
(
'./handlers/pasos_is_turnos_programados.js'
);
const
pasosTurnosProgramados
=
require
(
'./handlers/pasos_is_turnos_programados.js'
);
const
pasosIpsTurnosBajoDemanda
=
require
(
'./handlers/pasos_ips_turnos_bajo_demanda'
);
const
is
=
require
(
'./endpoints/is.js'
);
const
is
=
require
(
'./endpoints/is.js'
);
const
sendinblue
=
require
(
'./endpoints/sendinblue.js'
);
const
sendinblue
=
require
(
'./endpoints/sendinblue.js'
);
...
@@ -28,6 +30,9 @@ crisp.CrispClient.on("message:send", async function (message) {
...
@@ -28,6 +30,9 @@ crisp.CrispClient.on("message:send", async function (message) {
enviarUserAListaSendingblue
(
message
.
website_id
,
message
.
session_id
,
config
.
get
(
'sendingblueListId'
));
enviarUserAListaSendingblue
(
message
.
website_id
,
message
.
session_id
,
config
.
get
(
'sendingblueListId'
));
await
crisp
.
setSiguientePaso
(
message
.
website_id
,
message
.
session_id
,
pasosTurnosProgramados
.
ASK_RESERVAR_TURNO
)
await
crisp
.
setSiguientePaso
(
message
.
website_id
,
message
.
session_id
,
pasosTurnosProgramados
.
ASK_RESERVAR_TURNO
)
}
}
if
(
message
.
website_id
===
WEBSITE_ID_IPS_TURNOS_BAJO_DEMANDA
){
await
crisp
.
setSiguientePaso
(
message
.
website_id
,
message
.
session_id
,
pasosIpsTurnosBajoDemanda
.
BIENVENIDA
)
}
}
}
await
darSiguientePaso
(
message
,
message
.
website_id
,
message
.
session_id
);
await
darSiguientePaso
(
message
,
message
.
website_id
,
message
.
session_id
);
...
@@ -39,6 +44,9 @@ async function darSiguientePaso(message, website_id, session_id) {
...
@@ -39,6 +44,9 @@ async function darSiguientePaso(message, website_id, session_id) {
if
(
website_id
===
WEBSITE_ID_TURNOS_PROGRAMADOS
){
if
(
website_id
===
WEBSITE_ID_TURNOS_PROGRAMADOS
){
handlerTurnosProgramados
[
siguientePaso
](
message
,
userData
,
website_id
,
session_id
);
handlerTurnosProgramados
[
siguientePaso
](
message
,
userData
,
website_id
,
session_id
);
}
}
if
(
website_id
===
WEBSITE_ID_IPS_TURNOS_BAJO_DEMANDA
){
handlerTurnosBajoDemanda
[
siguientePaso
](
message
,
userData
,
website_id
,
session_id
);
}
}
}
async
function
enviarUserAListaSendingblue
(
website_id
,
session_id
,
listId
){
async
function
enviarUserAListaSendingblue
(
website_id
,
session_id
,
listId
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment