Skip to content
This repository was archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
ID corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
kkretsch committed Sep 29, 2017
1 parent 27818d9 commit 1474b8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,15 @@ function createApiRouter(express, app, connectionPool) {
console.log(error);
callback(error);
} else {
var idTweet = tweet.id;
// console.log(tweet);
var idTweet = tweet.id_str;
var urlTweet = "https://twitter.com/AlibIPde/status/" + idTweet;
myConnectionPool.query("UPDATE published SET urlTwitter=? WHERE id=?", [urlTweet,idEntry], function(err) {
if(error) {
console.log(error);
callback(error);
} else {
console.log("inserted dbid="+idEntry);
console.log("inserted url " + urlTweet + " in dbid="+idEntry);
callback(null);
} // if
}); // update
Expand Down

0 comments on commit 1474b8f

Please sign in to comment.