zs 2 年之前
父節點
當前提交
28e1b63e83
共有 1 個文件被更改,包括 1 次插入5 次删除
  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;
   }
 }