mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-22 01:02:28 +00:00
Use Unauthorized instead of Forbid on Website & Api
This commit is contained in:
parent
b0858448c8
commit
a603cdb002
2 changed files with 4 additions and 4 deletions
ProjectLighthouse.Servers.API/Controllers
|
@ -105,7 +105,7 @@ public class UserEndpoints : ApiEndpointController
|
|||
string authToken = authHeader[(authHeader.IndexOf(' ') + 1)..];
|
||||
|
||||
ApiKeyEntity? apiKey = await this.database.APIKeys.FirstOrDefaultAsync(k => k.Key == authToken);
|
||||
if (apiKey == null) return this.Forbid();
|
||||
if (apiKey == null) return this.Unauthorized();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(username))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue