mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-10 18:01:27 +00:00
Revert slot API to old functionality
This commit is contained in:
parent
c6156d85cd
commit
f2dd41dd52
3 changed files with 81 additions and 10 deletions
|
@ -39,7 +39,7 @@ public class SlotEndpoints : ApiEndpointController
|
|||
List<ApiSlot> minimalSlots = (await this.database.Slots.OrderByDescending(s => s.FirstUploaded)
|
||||
.Skip(skip)
|
||||
.Take(limit)
|
||||
.ToListAsync()).ToSerializableList(ApiSlot.CreateFromEntity);
|
||||
.ToListAsync()).ToSerializableList(MinimalApiSlot.CreateFromEntity);
|
||||
|
||||
return this.Ok(minimalSlots);
|
||||
}
|
||||
|
@ -59,6 +59,6 @@ public class SlotEndpoints : ApiEndpointController
|
|||
SlotEntity? slot = await this.database.Slots.FirstOrDefaultAsync(u => u.SlotId == id);
|
||||
if (slot == null) return this.NotFound();
|
||||
|
||||
return this.Ok(ApiSlot.CreateFromEntity(slot));
|
||||
return this.Ok(ApiSlot.CreateFromEntity(slot, this.database));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue