Skip to content

Commit

Permalink
🔒️ never show other user ids
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Aug 28, 2023
1 parent 36e59b2 commit a7f45ef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/models/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ export class Story {
@Fields.object<Story>((options, remult) => {
options.allowApiUpdate = false;
options.serverExpression = (s) => {
if (s.revealed) {
return s._votes;
}

return s._votes?.map((v) => {
if (v.participant.id === remult.user?.id) {
return v;
}

return {
participant: { id: "", name: v.participant.name },
vote: "?",
vote: s.revealed ? v.vote : "?",
};
});
};
Expand Down

0 comments on commit a7f45ef

Please sign in to comment.