예제 #1
0
        public async Task <ActionResult <ChallengeSpec> > GetChallengeSpec([FromRoute] string id)
        {
            await Validate(new Entity { Id = id });

            AuthorizeAny(
                () => Actor.IsAdmin,
                () => _svc.CanEdit(id, Actor.Id).Result
                );

            return(Ok(
                       await _svc.GetChallenge(id)
                       ));
        }