@@ -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;
}