Skip to content

Commit

Permalink
fix: closes #110
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis3797 committed Jun 12, 2024
1 parent 07f6d8d commit 2275063
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,20 @@ io.on("connection", (socket) => {
});
}

if (user.id === stream.streamer.id) {
return cb({
success: false,
data: null,
error: [
{
name: "Forbidden",
code: -1,
msg: "You cannot send a reward to yourself"
}
]
});
}

// check if reward type is valid and get points
const redwardInfo = rewards[reward.type];

Expand Down

0 comments on commit 2275063

Please sign in to comment.