mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-03 22:52:27 +00:00
Fix levels LBP2 levels showing in LBP1
This commit is contained in:
parent
85f3f3cd8d
commit
85c29eae81
2 changed files with 53 additions and 13 deletions
|
@ -94,6 +94,13 @@ namespace LBPUnion.ProjectLighthouse
|
|||
return await this.UserFromAuthToken(mmAuth);
|
||||
}
|
||||
|
||||
public async Task<Token?> TokenFromRequest(HttpRequest request)
|
||||
{
|
||||
if (!request.Cookies.TryGetValue("MM_AUTH", out string? mmAuth) || mmAuth == null) return null;
|
||||
|
||||
return await this.Tokens.FirstOrDefaultAsync(t => t.UserToken == mmAuth);
|
||||
}
|
||||
|
||||
public async Task<(User, Token)?> UserAndTokenFromRequest(HttpRequest request)
|
||||
{
|
||||
if (!request.Cookies.TryGetValue("MM_AUTH", out string? mmAuth) || mmAuth == null) return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue