mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-26 15:08:39 +00:00
Fix comments and unauthorize null users
This commit is contained in:
parent
7495c41d44
commit
cb6d77203b
3 changed files with 14 additions and 5 deletions
|
@ -43,8 +43,9 @@ public class MatchController : ControllerBase
|
|||
GameTokenEntity token = this.GetToken();
|
||||
|
||||
UserEntity? user = await this.database.UserFromGameToken(token);
|
||||
if (user == null) return this.Forbid();
|
||||
if (user == null) return this.Unauthorized();
|
||||
|
||||
// Return bad request on unverified email if enforcement is enabled
|
||||
if (emailEnforcementEnabled && !user.EmailAddressVerified) return this.BadRequest();
|
||||
|
||||
await LastContactHelper.SetLastContact(this.database, user, token.GameVersion, token.Platform);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue