Ejemplo n.º 1
0
        public HttpResponse Create(string id)
        {
            if (!IsUserSignedIn())
            {
                return(Redirect("/Users/Login"));
            }

            var problem = _problemService.GetProblemById(id);

            if (problem is null)
            {
                return(Error("Problem does not exist!"));
            }

            return(View(new SubmissionCreateViewModel {
                ProblemId = id, Name = problem.Name
            }));
        }