Skip to content

Commit aae3d9b

Browse files
committed
Remove annoying database log
1 parent 9ee51e8 commit aae3d9b

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.8
2+
3+
- Remove annoying database log
4+
15
# 1.0.7
26

37
- Fix logger timestamps

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stuyk/cross-resource-cache",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "add mongodb database saving to cross resource environments for altv",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

Diff for: src/cache/index.ts

-8
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ async function writeToDatabase(entity: alt.Entity, data: { [key: string]: any })
3030
const collection = <string>entity.getMeta('collection');
3131

3232
const db = await Database.getMongoClient();
33-
const existingCollections = await db.listCollections().toArray();
34-
if (!existingCollections.findIndex((x) => x.name === collection)) {
35-
try {
36-
await db.createCollection(collection);
37-
} catch (err) {
38-
console.error(`Could not create collection: ${collection}`);
39-
}
40-
}
4133

4234
try {
4335
const filter = { _id: new ObjectId(_id) };

0 commit comments

Comments
 (0)