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

Commit

Permalink
Correction de plusieurs bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hardware committed Jan 24, 2015
1 parent fcd5f44 commit eac1cd4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions routes/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ exports.handleRequests = function( req, res, next ) {

}, function( err ) {

if( err ) { next( err ); return; }

res.send('PROCESSING REQUESTS COMPLETED !');
if( err ) {
next( err );
return;
} else {
res.send('PROCESSING REQUESTS COMPLETED !');
}

});

Expand Down Expand Up @@ -76,9 +79,9 @@ var inform = function( res, request, next ) {
// Envoi du mail de notification
mailer.send( payload, next );

if( request.phone )
// Envoi du sms de notification
ovh.sendSms( res, request.name, request.phone, next );
// if( request.phone )
// Envoi du sms de notification
// ovh.sendSms( res, request.name, request.phone, next );

if( request.pushbullet_token )
// Envoi de la notification à Pushbullet
Expand Down
6 changes: 3 additions & 3 deletions routes/pushbulletApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports.auth = function( code, next, callback ) {
}, function( err, response, body ) {

if( err || response.statusCode != 200 ) {
next( new Error("PUSHBULLET API - OAUTH Request failed : " + body.error.message) );
next( new Error("PUSHBULLET API - OAUTH Request failed") );
return;
}

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

if( err || response.statusCode != 200 ) {
console.log("PUSHBULLET API - Request failed : " + body.error.message );
console.log("PUSHBULLET API - Request failed");
}

});
Expand All @@ -88,7 +88,7 @@ var callApi = function( url, method, token, params, next, callback ) {
}, function( err, response, body ) {

if( err || response.statusCode != 200 ) {
next( new Error("PUSHBULLET API - Request failed : " + body.error.message) );
next( new Error("PUSHBULLET API - Request failed") );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ block content
if formErrors["phone"]
span.help-block #{formErrors["phone"]["msg"]}

.row
div(class='row' style='display:none')
.col-md-6.col-md-offset-3
.form-group

Expand Down

0 comments on commit eac1cd4

Please sign in to comment.