valor-labs / valor-launchpad

2 stars 2 forks source link

Wrong activities displaying for specific user #609

Open sawyerbutton opened 2 years ago

sawyerbutton commented 2 years ago

Title

Check Pages functionality works

Description

Logged user can view his profile activities on the 'Activities' window of the Profile page

Expected

There are the profile owner activities shown on the 'Activities' window of the Profile page

Issue

There are Liliana Stracke, Cullen Stokes, and Owen Lueilwitz activities shown on the Owen Lueilwitz Activities window

Dev's comment

sawyerbutton commented 2 years ago

This should be a server data error.

@Get('activity')
  getActivities(
    @Query('lastReadAt') lastReadAtStr: string,
    @Query('limit') limitStr: string
  ) {
    const lastReadAt = !lastReadAtStr ? null : +lastReadAtStr;
    const limit = !limitStr ? 10 : +limitStr;
    if (!isNil(limit)) {
      return this.dashboardSocialService.getActivities(lastReadAt, limit);
    } else {
      return { result: [] };
    }
  }

Controller to get activities does not bind to any user. Currently, we don't have a table to store user's activities. This need some refactor.