diff --git a/LANCommander/Services/KeyService.cs b/LANCommander/Services/KeyService.cs index d331bac..cda2b36 100644 --- a/LANCommander/Services/KeyService.cs +++ b/LANCommander/Services/KeyService.cs @@ -29,13 +29,18 @@ namespace LANCommander.Services return key; } - public async Task Release(Guid id) + public async Task Release(Guid id) { var key = await Get(id); if (key == null) - return; + return null; + return await Release(key); + } + + public async Task Release(Key key) + { switch (key.AllocationMethod) { case KeyAllocationMethod.UserAccount: @@ -49,7 +54,7 @@ namespace LANCommander.Services break; } - await Update(key); + return await Update(key); } } }