Revert website Forbid and Unauthorized method usage to StatusCode

This is because by default ASP.NET expects an authentication scheme to be registered when using these methods.
This commit is contained in:
Slendy 2023-03-30 19:23:11 -05:00
parent 50d1d9c7e5
commit c34b7f3e79
No known key found for this signature in database
GPG key ID: 7288D68361B91428
5 changed files with 8 additions and 8 deletions

View file

@ -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.Unauthorized();
if (apiKey == null) return this.StatusCode(403);
if (!string.IsNullOrWhiteSpace(username))
{