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
c1d8eb7d
Commit
c1d8eb7d
authored
Nov 24, 2021
by
Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edita manejo de error en sendinblue
parent
b4325415
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
sendinblue.js
endpoints/sendinblue.js
+3
-1
No files found.
endpoints/sendinblue.js
View file @
c1d8eb7d
...
@@ -40,7 +40,6 @@ async function createOrUpdateContact(email, nombres, apellidos, sms){
...
@@ -40,7 +40,6 @@ async function createOrUpdateContact(email, nombres, apellidos, sms){
})
})
.
catch
(
async
function
(
error
)
{
.
catch
(
async
function
(
error
)
{
if
(
error
.
response
.
data
.
code
===
ERROR_CODE_DUPLICATE_PARAMETER
){
if
(
error
.
response
.
data
.
code
===
ERROR_CODE_DUPLICATE_PARAMETER
){
console
.
log
(
error
.
response
.
data
)
return
await
sendinblueClient
.
put
(
encodeURI
(
`/contacts/
${
email
}
`
),
{
return
await
sendinblueClient
.
put
(
encodeURI
(
`/contacts/
${
email
}
`
),
{
"attributes"
:
{
"attributes"
:
{
"NOMBRE"
:
nombres
,
"NOMBRE"
:
nombres
,
...
@@ -52,6 +51,9 @@ async function createOrUpdateContact(email, nombres, apellidos, sms){
...
@@ -52,6 +51,9 @@ async function createOrUpdateContact(email, nombres, apellidos, sms){
return
response
.
data
;
return
response
.
data
;
})
})
}
}
else
{
return
error
;
}
});
});
}
}
...
...
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