Serialize SlotType with Slot API responses

This commit is contained in:
Slendy 2023-04-15 22:39:33 -05:00
parent 9b7924cd07
commit fc522b33a4
No known key found for this signature in database
GPG key ID: 7288D68361B91428
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,6 @@
using LBPUnion.ProjectLighthouse.Database; using LBPUnion.ProjectLighthouse.Database;
using LBPUnion.ProjectLighthouse.Types.Entities.Level; using LBPUnion.ProjectLighthouse.Types.Entities.Level;
using LBPUnion.ProjectLighthouse.Types.Levels;
using LBPUnion.ProjectLighthouse.Types.Misc; using LBPUnion.ProjectLighthouse.Types.Misc;
using LBPUnion.ProjectLighthouse.Types.Users; using LBPUnion.ProjectLighthouse.Types.Users;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -11,6 +12,7 @@ public struct ApiSlot
{ {
public int SlotId { get; set; } public int SlotId { get; set; }
public int InternalSlotId { get; set; } public int InternalSlotId { get; set; }
public SlotType Type { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string IconHash { get; set; } public string IconHash { get; set; }
@ -42,6 +44,7 @@ public struct ApiSlot
{ {
SlotId = slot.SlotId, SlotId = slot.SlotId,
InternalSlotId = slot.InternalSlotId, InternalSlotId = slot.InternalSlotId,
Type = slot.Type,
Name = slot.Name, Name = slot.Name,
Description = slot.Description, Description = slot.Description,
IconHash = slot.IconHash, IconHash = slot.IconHash,

View file

@ -1,4 +1,5 @@
using LBPUnion.ProjectLighthouse.Types.Entities.Level; using LBPUnion.ProjectLighthouse.Types.Entities.Level;
using LBPUnion.ProjectLighthouse.Types.Levels;
using LBPUnion.ProjectLighthouse.Types.Misc; using LBPUnion.ProjectLighthouse.Types.Misc;
using LBPUnion.ProjectLighthouse.Types.Users; using LBPUnion.ProjectLighthouse.Types.Users;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -9,6 +10,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.API.Responses;
public struct MinimalApiSlot public struct MinimalApiSlot
{ {
public int SlotId { get; set; } public int SlotId { get; set; }
public SlotType Type { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string IconHash { get; set; } public string IconHash { get; set; }
public bool TeamPick { get; set; } public bool TeamPick { get; set; }
@ -26,6 +28,7 @@ public struct MinimalApiSlot
new() new()
{ {
SlotId = slot.SlotId, SlotId = slot.SlotId,
Type = slot.Type,
Name = slot.Name, Name = slot.Name,
IconHash = slot.IconHash, IconHash = slot.IconHash,
TeamPick = slot.TeamPick, TeamPick = slot.TeamPick,