mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
commit
e8e79657e6
2 changed files with 7 additions and 2 deletions
|
@ -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"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -56,7 +58,9 @@ namespace ProjectLighthouse.Controllers {
|
|||
|
||||
[HttpPost("unpublish/{id:int}")]
|
||||
public async Task<IActionResult> 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);
|
||||
|
|
|
@ -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) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue