Ejemplo n.º 1
0
        public async Task <ActionResult <Vm> > Answer(string id, [FromBody] VmAnswer answer)
        {
            await AuthorizeAction(id, "answer");

            Vm vm = await _pod.Answer(id, answer);

            SendBroadcast(vm, "answer");

            return(Ok(vm));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <Vm> > AnswerVmQuestion(string id, [FromBody] VmAnswer answer)
        {
            AuthorizeAny(
                () => Actor.IsAdmin,
                () => CanManageVm(id, Actor.Id).Result
                );

            Vm vm = await _pod.Answer(id, answer);

            SendBroadcast(vm, "answer");

            return(Ok(vm));
        }