fix(structure): format

This commit is contained in:
2019-02-13 22:08:58 +01:00
parent 761b742e21
commit 3eeac7b936
8 changed files with 38 additions and 40 deletions

View File

@ -77,7 +77,7 @@ export class SmartDataDbDoc<T> {
*/
constructor() {
this.name = this.constructor['name'];
if(this.constructor['smartdataCollection']) {
if (this.constructor['smartdataCollection']) {
// tslint:disable-next-line: no-string-literal
this.collection = this.constructor['smartdataCollection'];
// tslint:disable-next-line: no-string-literal
@ -92,12 +92,12 @@ export class SmartDataDbDoc<T> {
static async getInstances<T>(filterArg): Promise<T[]> {
let self: any = this; // fool typesystem
let referenceMongoDBCollection: SmartdataCollection<T>;
if (self.smartdataCollection) {
referenceMongoDBCollection = self.smartdataCollection;
} else if (self.smartdataDelayedCollection) {
referenceMongoDBCollection = self.smartdataDelayedCollection();
};
}
const foundDocs = await referenceMongoDBCollection.find(filterArg);
const returnArray = [];
for (let item of foundDocs) {
@ -142,9 +142,7 @@ export class SmartDataDbDoc<T> {
/**
* deletes a document from the database
*/
async delete() {
}
async delete() {}
/**
* also store any referenced objects to DB