* insert_log_item does exactly what it's name suggests inserts a log enty * @param {String} url - the current url (page) being viewed. * @param {String} next_page - the next page to be fetched. * @param {function} callback - callback function to be executed on success.
(url, next_page, callback)
| 232 | * @param {function} callback - callback function to be executed on success. |
| 233 | */ |
| 234 | function insert_log_item (url, next_page, callback) { |
| 235 | connect( function () { |
| 236 | const query = `INSERT INTO logs (url, next_page) VALUES ($1, $2)`; |
| 237 | const values = [url, next_page] |
| 238 | PG_CLIENT.query(query, values, function(error, data) { |
| 239 | utils.log_error(error, data, new Error().stack); |
| 240 | return utils.exec_cb(callback, error, data); |
| 241 | }); |
| 242 | }); |
| 243 | } |
| 244 | |
| 245 | function profile_next_page(urls, username) { |
| 246 | urls.push(username + '/followers'); |
no test coverage detected