diff --git a/server/manager/activity.ts b/server/manager/activity.ts index 3ea43e393..d0f41e5be 100644 --- a/server/manager/activity.ts +++ b/server/manager/activity.ts @@ -100,7 +100,7 @@ export const getActivities = async ({ const activities = await subQueryBuilder .orderBy('activity.isPinned', 'DESC') - .addOrderBy('activity.updateDate', 'DESC') + .addOrderBy('activity.publishDate', 'DESC') .limit(limit) .offset(page * limit) .getMany(); diff --git a/src/components/activities/ActivityCard/index.tsx b/src/components/activities/ActivityCard/index.tsx index 1449c0326..76a156262 100644 --- a/src/components/activities/ActivityCard/index.tsx +++ b/src/components/activities/ActivityCard/index.tsx @@ -120,7 +120,7 @@ export const ActivityCard = ({ )}

-

PubliƩ le {toDate(activity.createDate as string)}

+

PubliƩ le {toDate(activity.publishDate as string)}

{userIsPelico ? ( diff --git a/types/activity.type.ts b/types/activity.type.ts index 02e952cad..c71456c48 100644 --- a/types/activity.type.ts +++ b/types/activity.type.ts @@ -39,6 +39,7 @@ export interface Activity { createDate?: Date | string; updateDate?: Date | string; + publishDate?: Date | string; deleteDate?: Date | string; // activity data