evakv0th / Alias-solvd-team2

5 stars 1 forks source link

Chat.controller view bug #76

Open SaintAngeLs opened 11 months ago

SaintAngeLs commented 11 months ago

The original code attempts to retrieve the username from req.params.userName. This implies that the username is expected as a URL parameter. However, in a typical application with authentication, the current user's information should be extracted from the request's user object, usually populated by authentication middleware, not directly from URL parameters.

evakv0th commented 11 months ago

Yes, this was made for simplicity atm, it will be fixed today in my PR where i connect chat to game service logic (so we can somewhat simulate game for video). Had hard time trying to retrieve info from user object, but currently i know how to do it