This commit is contained in:
Erik 2023-07-19 23:24:53 +03:00
parent 2cd8ba3ba0
commit 308c9cb63d
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@navy.gif/wrappers", "name": "@navy.gif/wrappers",
"version": "1.5.5", "version": "1.5.6",
"description": "Various wrapper classes I use in my projects", "description": "Various wrapper classes I use in my projects",
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git", "repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
"author": "Navy.gif", "author": "Navy.gif",

View File

@ -363,7 +363,7 @@ class MongoDB
return this.#db.collection(coll).countDocuments(query); return this.#db.collection(coll).countDocuments(query);
} }
async ensureIndex (collection: string, index: IndexSpecification, options?: CreateIndexesOptions) async ensureIndex (collection: string, index: IndexSpecification, options?: CreateIndexesOptions): Promise<void>
{ {
if (!this.#db) if (!this.#db)
return Promise.reject(new Error('MongoDB not connected')); return Promise.reject(new Error('MongoDB not connected'));
@ -372,7 +372,7 @@ class MongoDB
await this.#db.collection(collection).createIndex(index, options); await this.#db.collection(collection).createIndex(index, options);
} }
async ensureIndices (collection: string, indices: IndexSpecification[], options?: CreateIndexesOptions) async ensureIndices (collection: string, indices: IndexSpecification[], options?: CreateIndexesOptions): Promise<void>
{ {
if (!this.#db) if (!this.#db)
return Promise.reject(new Error('MongoDB not connected')); return Promise.reject(new Error('MongoDB not connected'));