Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Commit 0541b28

Browse files
committed
Ajout du paramètre 'next' au niveau de la fonction sendNotification()
1 parent 1065941 commit 0541b28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routes/cron.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ var inform = function( res, request, next ) {
162162

163163
if( request.pushbullet_token )
164164
// Envoi de la notification à Pushbullet
165-
pushbullet.sendNotification( request.pushbullet_token, request.name, orderUrl );
165+
pushbullet.sendNotification( request.pushbullet_token, request.name, orderUrl, next );
166166

167167
// Mise à jour de l'état de la demande ( pending -> done )
168168
requestModel.updateState( 'done', request.id, next );

routes/pushbulletApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exports.getUserIdentity = function( token, next, callback ) {
4242
/*
4343
* Envoi une notification à Pushbullet
4444
*/
45-
exports.sendNotification = function( token, offer, orderUrl ) {
45+
exports.sendNotification = function( token, offer, orderUrl, next ) {
4646

4747
request({
4848

@@ -63,7 +63,7 @@ exports.sendNotification = function( token, offer, orderUrl ) {
6363
}, function( err, response, body ) {
6464

6565
if( err || response.statusCode != 200 ) {
66-
next( new Error("PUSHBULLET API - Request failed") );
66+
next( new Error("PUSHBULLET API - Send notification failed") );
6767
return;
6868
}
6969

0 commit comments

Comments
 (0)