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

Commit

Permalink
Fix audit (#148)
Browse files Browse the repository at this point in the history
* Fix audit

* Fix typescript errors
  • Loading branch information
srezacova authored Aug 12, 2022
1 parent 88797fd commit d6ac4e2
Show file tree
Hide file tree
Showing 13 changed files with 6,920 additions and 3,010 deletions.
4 changes: 1 addition & 3 deletions functions/csvLoader/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export const initializeDBConnection = async (context: Context) => {
});
}
await mongoose.connect(config.mongoUri, {
useNewUrlParser: true,
useUnifiedTopology: true,
connectTimeoutMS: 360000,
socketTimeoutMS: 360000,
dbName: config.dbName,
Expand All @@ -54,7 +52,7 @@ export const storeToDb = async (collectionName: string, data: Array<Attribute>)
attributeId: item.attributeId,
},
update: {
$set: item,
$set: { ...item },
},
upsert: true,
},
Expand Down
4 changes: 1 addition & 3 deletions functions/library/KOBOFetcher/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export const initializeDBConnection = async (context: Context) => {
});
}
await mongoose.connect(config.mongoUri, {
useNewUrlParser: true,
useUnifiedTopology: true,
connectTimeoutMS: 360000,
socketTimeoutMS: 360000,
dbName: config.dbName,
Expand Down Expand Up @@ -72,7 +70,7 @@ export const storeToDb = async (collectionName: string, data: Array<Attribute>)
'properties.attributeId': item.properties.attributeId,
},
update: {
$set: item,
$set: { ...item },
},
upsert: true,
},
Expand Down
4 changes: 1 addition & 3 deletions functions/library/incidenceRateCalculation/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export const initializeDBConnection = async (context: Context) => {
});
}
await mongoose.connect(config.mongoUri, {
useNewUrlParser: true,
useUnifiedTopology: true,
connectTimeoutMS: 360000,
socketTimeoutMS: 360000,
dbName: config.dbName,
Expand Down Expand Up @@ -152,7 +150,7 @@ export const storeToDb = async (collectionName: string, data: Array<Attribute>)
attributeId: item.attributeId,
},
update: {
$set: item,
$set: { ...item },
},
upsert: true,
},
Expand Down
Loading

0 comments on commit d6ac4e2

Please sign in to comment.