lint and format
This commit is contained in:
parent
be0c66110a
commit
f684d4e2c8
1 changed files with 2 additions and 4 deletions
|
@ -11,7 +11,7 @@ const pool = mysql.createPool({
|
||||||
function addMarker(marker) {
|
function addMarker(marker) {
|
||||||
const insertQuery = "INSERT INTO markers VALUES (?,?,?,POINT(?,?),?)";
|
const insertQuery = "INSERT INTO markers VALUES (?,?,?,POINT(?,?),?)";
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
|
|
||||||
const query = mysql.format(insertQuery, [
|
const query = mysql.format(insertQuery, [
|
||||||
marker.name,
|
marker.name,
|
||||||
marker.description,
|
marker.description,
|
||||||
|
@ -20,7 +20,7 @@ function addMarker(marker) {
|
||||||
marker.lat,
|
marker.lat,
|
||||||
date,
|
date,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
pool.query(query, (err, response) => {
|
pool.query(query, (err, response) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
@ -51,8 +51,6 @@ function getUpdatedMarkers(fromDate, callback) {
|
||||||
connection.release(); // return the connection to pool
|
connection.release(); // return the connection to pool
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
callback(rows);
|
callback(rows);
|
||||||
|
|
||||||
console.log(rows)
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue