From aae3d9bc497aa65e638c8d8712573186906822c3 Mon Sep 17 00:00:00 2001 From: Stuyk Date: Sat, 15 Jul 2023 20:37:58 -0600 Subject: [PATCH] Remove annoying database log --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/cache/index.ts | 8 -------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4eb04..f46a0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.0.8 + +- Remove annoying database log + # 1.0.7 - Fix logger timestamps diff --git a/package.json b/package.json index 33174c8..3cbad94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stuyk/cross-resource-cache", - "version": "1.0.7", + "version": "1.0.8", "description": "add mongodb database saving to cross resource environments for altv", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/cache/index.ts b/src/cache/index.ts index aac5e75..342fd6c 100644 --- a/src/cache/index.ts +++ b/src/cache/index.ts @@ -30,14 +30,6 @@ async function writeToDatabase(entity: alt.Entity, data: { [key: string]: any }) const collection = entity.getMeta('collection'); const db = await Database.getMongoClient(); - const existingCollections = await db.listCollections().toArray(); - if (!existingCollections.findIndex((x) => x.name === collection)) { - try { - await db.createCollection(collection); - } catch (err) { - console.error(`Could not create collection: ${collection}`); - } - } try { const filter = { _id: new ObjectId(_id) };