Skip to content

Commit

Permalink
fix: return empty array when timeline is exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
RiXelanya committed Oct 17, 2024
1 parent 3677313 commit 9f1966b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/services/experience.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ export class ExperienceService {
userId: {eq: this.currentUser[securityId]},
},
);
const experience = await this.experienceRepository.findById(id);

if (
experience?.exclusive === true &&
this.currentUser[securityId] !== experience.user?.id
) {
return [];
}

return this.postService.find(filter, id, true);
}
Expand Down

0 comments on commit 9f1966b

Please sign in to comment.