public async Task <ActionResult <Vm> > Delete(string id) { await AuthorizeAction(id, "delete"); Vm vm = await _pod.Delete(id); SendBroadcast(vm, "delete"); return(Ok(vm)); }
public async Task <ActionResult <Vm> > DeleteVm(string id) { AuthorizeAny( () => Actor.IsAdmin, () => CanManageVm(id, Actor.Id).Result ); Vm vm = await _pod.Delete(id); SendBroadcast(vm, "delete"); return(Ok(vm)); }