Exemple #1
0
        public ActionResult CancelCodeEvent(
            [FromRoute, SwaggerParameter("The ID of the Code Event", Required = true)]
            long codeEventId
            )
        {
            var isOwner = _codeEventService.IsUserAnOwner(codeEventId, HttpContext.User);

            if (!isOwner)
            {
                return(StatusCode(403));
            }

            _codeEventService.CancelCodeEvent(codeEventId);

            return(NoContent());
        }