mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-10 05:48:39 +00:00
Use Database.RemoveSlot when removing slot on website
This commit is contained in:
parent
be9e3edef5
commit
40ce3edba7
1 changed files with 1 additions and 4 deletions
|
@ -62,10 +62,7 @@ public class AdminSlotController : ControllerBase
|
|||
|
||||
if (slot.Location == null) throw new ArgumentNullException();
|
||||
|
||||
this.database.Locations.Remove(slot.Location);
|
||||
this.database.Slots.Remove(slot);
|
||||
|
||||
await this.database.SaveChangesAsync();
|
||||
await this.database.RemoveSlot(slot);
|
||||
|
||||
return this.Ok();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue