mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-12 04:52:26 +00:00
Major refactor and reorganization of types (#652)
* Start of reorganization and cleanup * Remove duplicate title id * Refactor types * Fix Release building * Move classes in /Types to a Types namespace * Fix compilation error (RoomVisualizerPage strikes again) * Fix bugs created from auto merge * Fix auto-merge compilation error * Changes from review/fix failed merge
This commit is contained in:
parent
c8120b3388
commit
f1c5ad4002
316 changed files with 1623 additions and 1518 deletions
|
@ -1,12 +1,11 @@
|
|||
#nullable enable
|
||||
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
using LBPUnion.ProjectLighthouse.Types.Users;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
// ReSharper disable RouteTemplates.ActionRoutePrefixCanBeExtractedToControllerRoute
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
|
@ -79,7 +78,7 @@ public class UserEndpoints : ApiEndpointController
|
|||
|
||||
string authToken = authHeader[(authHeader.IndexOf(' ') + 1)..];
|
||||
|
||||
APIKey? apiKey = await this.database.APIKeys.FirstOrDefaultAsync(k => k.Key == authToken);
|
||||
ApiKey? apiKey = await this.database.APIKeys.FirstOrDefaultAsync(k => k.Key == authToken);
|
||||
if (apiKey == null) return this.StatusCode(403, null);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(username))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue