Added distance and rating key to the user apis
This commit is contained in:
@@ -328,6 +328,8 @@ async function rankAndPaginateActivities(
|
||||
// interestXid: activity.activityType.interestXid,
|
||||
activityId: activity.id,
|
||||
activityTitle: activity.activityTitle,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
// activityDurationMins: activity.activityDurationMins,
|
||||
// sustainabilityScore: activity.sustainabilityScore,
|
||||
// cheapestPrice,
|
||||
@@ -935,6 +937,8 @@ export class UserService {
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(activity.id) ?? 0,
|
||||
hypeCount: activity.hypeCount,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: activity.activityType.energyLevel
|
||||
? {
|
||||
...activity.activityType.energyLevel,
|
||||
@@ -1103,6 +1107,8 @@ export class UserService {
|
||||
activityDurationMins: activity.activityDurationMins,
|
||||
sustainabilityScore: activity.sustainabilityScore,
|
||||
cheapestPrice,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: activity.activityType.energyLevel
|
||||
? {
|
||||
...activity.activityType.energyLevel,
|
||||
@@ -1324,6 +1330,8 @@ export class UserService {
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(a.id) ?? 0,
|
||||
activityTitle: a.activityTitle,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: {
|
||||
...a.activityType.energyLevel,
|
||||
presignedUrl: await attachPresignedUrl(
|
||||
@@ -1402,6 +1410,8 @@ export class UserService {
|
||||
hypeCount: g._count.activityXid,
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(act.id) ?? 0,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: {
|
||||
...act.activityType.energyLevel,
|
||||
presignedUrl: await attachPresignedUrl(
|
||||
@@ -1522,6 +1532,8 @@ export class UserService {
|
||||
activityTitle: a.activityTitle,
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(a.id) ?? 0,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: {
|
||||
...a.activityType.energyLevel,
|
||||
presignedUrl: await attachPresignedUrl(
|
||||
@@ -1543,6 +1555,8 @@ export class UserService {
|
||||
activityTitle: a.activityTitle,
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(a.id) ?? 0,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: {
|
||||
...a.activityType.energyLevel,
|
||||
presignedUrl: await attachPresignedUrl(
|
||||
@@ -1564,6 +1578,8 @@ export class UserService {
|
||||
activityTitle: a.activityTitle,
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(a.id) ?? 0,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
energyLevel: {
|
||||
...a.activityType.energyLevel,
|
||||
presignedUrl: await attachPresignedUrl(
|
||||
@@ -2289,7 +2305,7 @@ export class UserService {
|
||||
activityDurationMins: activity.activityDurationMins,
|
||||
sustainabilityScore: activity.sustainabilityScore,
|
||||
rating: 0,
|
||||
distanceKm: activity.distanceKm,
|
||||
distance: activity.distanceKm,
|
||||
cheapestPrice,
|
||||
energyLevel: activity.activityType.energyLevel
|
||||
? {
|
||||
@@ -2827,6 +2843,10 @@ export class UserService {
|
||||
mostHypedSorted.map(async activity => ({
|
||||
activityId: activity.id,
|
||||
activityTitle: activity.activityTitle,
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(activity.id) ?? 0,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
hypeCount: activity.hypeCount,
|
||||
energyLevel: activity.activityType.energyLevel
|
||||
? {
|
||||
@@ -2913,9 +2933,10 @@ export class UserService {
|
||||
activityTitle: activity.activityTitle,
|
||||
connectionInterestedCount:
|
||||
connectionInterestMap.get(activity.id) ?? 0,
|
||||
distance: 0,
|
||||
rating: 0,
|
||||
activityDurationMins: activity.activityDurationMins,
|
||||
sustainabilityScore: activity.sustainabilityScore,
|
||||
rating: 0,
|
||||
cheapestPrice,
|
||||
energyLevel: activity.activityType.energyLevel
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user