|
@@ -24,10 +24,10 @@ export class AchievementService extends BaseService<modelType> {
|
|
|
|
|
|
const userData = await this.uModel.findById(arr.user).lean();
|
|
|
if (userData) data.userInfo = { name: userData.nick_name || '', phone: userData.phone || '' };
|
|
|
-
|
|
|
- const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
|
|
|
- if (collection) data.is_collection = true;
|
|
|
}
|
|
|
+
|
|
|
+ const collection = await this.cModel.findOne({ user: user._id, source: arr._id }).lean();
|
|
|
+ if (collection) data.is_collection = true;
|
|
|
return { ...arr, ...data };
|
|
|
}
|
|
|
}
|