zs 2 rokov pred
rodič
commit
28e1b63e83
1 zmenil súbory, kde vykonal 1 pridanie a 5 odobranie
  1. 1 5
      src/service/contactoffice.service.ts

+ 1 - 5
src/service/contactoffice.service.ts

@@ -9,13 +9,9 @@ export class ContactofficeService extends BaseService<modelType> {
   @InjectEntityModel(Contactoffice)
   model: modelType;
   async query(filter, { skip, limit }): Promise<Array<any>> {
-    let res = {};
     const arr = [];
     const data = await this.model.findOne(filter);
-    if (data) {
-      res = data;
-    }
-    arr.push(res);
+    if (data) arr.push(data);
     return arr;
   }
 }