@@ -24,8 +24,8 @@ export class RoomController extends BaseController {
const { data, total } = await this.service.newQuery(filter, { skip, limit, sort: { 'meta.createdAt': -1 } });
const list = [];
for (const i of data) {
- let nd = await this.service.countNotRead(filter, i);
- nd = await this.service.fillId(nd);
+ let nd = await this.service.fillId(i);
+ nd = await this.service.countNotRead(filter, nd);
list.push(nd);
}
return { data: list, total };