diff --git a/ProjectLighthouse/Controllers/PublishController.cs b/ProjectLighthouse/Controllers/PublishController.cs index dd1fae0b..f94e4292 100644 --- a/ProjectLighthouse/Controllers/PublishController.cs +++ b/ProjectLighthouse/Controllers/PublishController.cs @@ -25,7 +25,9 @@ namespace ProjectLighthouse.Controllers { Slot slot = await this.GetSlotFromBody(); if(slot == null) return this.BadRequest(); // if the level cant be parsed then it obviously cant be uploaded - return this.Ok(LbpSerializer.TaggedStringElement("slot", "", "type", "user")); + string resource = LbpSerializer.StringElement("resource", slot.Resource); + + return this.Ok(LbpSerializer.TaggedStringElement("slot", resource, "type", "user")); } /// @@ -56,7 +58,9 @@ namespace ProjectLighthouse.Controllers { [HttpPost("unpublish/{id:int}")] public async Task Unpublish(int id) { - Slot slot = await database.Slots.FirstOrDefaultAsync(s => s.SlotId == id); + Slot slot = await database.Slots + .Include(s => s.Location) + .FirstOrDefaultAsync(s => s.SlotId == id); database.Locations.Remove(slot.Location); database.Slots.Remove(slot); diff --git a/ProjectLighthouse/Types/Slot.cs b/ProjectLighthouse/Types/Slot.cs index eb090eab..64e5c01c 100644 --- a/ProjectLighthouse/Types/Slot.cs +++ b/ProjectLighthouse/Types/Slot.cs @@ -85,6 +85,7 @@ namespace ProjectLighthouse.Types { LbpSerializer.StringElement("npHandle", Creator.Username) + LbpSerializer.StringElement("description", Description) + LbpSerializer.StringElement("icon", IconHash) + + LbpSerializer.StringElement("rootLevel", RootLevel) + LbpSerializer.StringElement("resource", Resource) + LbpSerializer.StringElement("location", Location.Serialize()) + LbpSerializer.StringElement("initiallyLocked", InitiallyLocked) +