mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-15 23:09:14 +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();
|
if (slot.Location == null) throw new ArgumentNullException();
|
||||||
|
|
||||||
this.database.Locations.Remove(slot.Location);
|
await this.database.RemoveSlot(slot);
|
||||||
this.database.Slots.Remove(slot);
|
|
||||||
|
|
||||||
await this.database.SaveChangesAsync();
|
|
||||||
|
|
||||||
return this.Ok();
|
return this.Ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue