Exemple #1
0
        public async Task <ActionResult <Vm> > Delete(string id)
        {
            await AuthorizeAction(id, "delete");

            Vm vm = await _pod.Delete(id);

            SendBroadcast(vm, "delete");

            return(Ok(vm));
        }
Exemple #2
0
        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));
        }