Revert slot API to old functionality

This commit is contained in:
Slendy 2023-04-04 20:51:53 -05:00
parent c6156d85cd
commit f2dd41dd52
No known key found for this signature in database
GPG key ID: 7288D68361B91428
3 changed files with 81 additions and 10 deletions

View file

@ -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));
}
}