mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Move API-specific responses to API project
This commit is contained in:
parent
b2ec7eae57
commit
b48f3df4e2
4 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
#nullable enable
|
||||
using LBPUnion.ProjectLighthouse.Servers.API.Responses;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Levels;
|
||||
using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Servers.API.Responses;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Api;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.API.Controllers;
|
||||
|
|
29
ProjectLighthouse.Servers.API/Responses/MinimalSlot.cs
Normal file
29
ProjectLighthouse.Servers.API/Responses/MinimalSlot.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Levels;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.API.Responses;
|
||||
|
||||
public struct MinimalSlot
|
||||
{
|
||||
public int SlotId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string IconHash { get; set; }
|
||||
public bool TeamPick { get; set; }
|
||||
public GameVersion GameVersion { get; set; }
|
||||
#if DEBUG
|
||||
public long FirstUploaded { get; set; }
|
||||
#endif
|
||||
|
||||
public static MinimalSlot FromSlot(Slot slot)
|
||||
=> new()
|
||||
{
|
||||
SlotId = slot.SlotId,
|
||||
Name = slot.Name,
|
||||
IconHash = slot.IconHash,
|
||||
TeamPick = slot.TeamPick,
|
||||
GameVersion = slot.GameVersion,
|
||||
#if DEBUG
|
||||
FirstUploaded = slot.FirstUploaded,
|
||||
#endif
|
||||
};
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace LBPUnion.ProjectLighthouse.Servers.API.Responses;
|
||||
|
||||
public class StatisticsResponse
|
||||
{
|
||||
public int RecentMatches { get; set; }
|
||||
public int Slots { get; set; }
|
||||
public int Users { get; set; }
|
||||
public int TeamPicks { get; set; }
|
||||
public int Photos { get; set; }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue