Added separate function for putStations

This commit is contained in:
Fred Boniface 2022-12-23 16:57:55 +00:00
parent 5ff40057c3
commit 196d0621f5

View File

@ -18,23 +18,26 @@ async function putCorpusAll(data){
}; };
async function putStations(data){ async function putStations(data){
await client.connect();
}; var coll = db.collection("stations");
async function putData(data,collection) {
await client.connect()
var coll = db.collection(collection);
var result = coll.insertMany(data); var result = coll.insertMany(data);
console.log(result); console.log(result);
} };
//async function putData(data,collection) {
// await client.connect()
// var coll = db.collection(collection);
// var result = coll.insertMany(data);
// console.log(result);
//};
async function getCrs(tiploc) { async function getCrs(tiploc) {
} };
async function checkCrs(crs) { async function checkCrs(crs) {
} };
module.exports = { module.exports = {
putData, putData,