Exemplo n.º 1
0
        public int Post([FromBody] AssessmentDetail assessmentDetail)
        {
            // validate the assessment for the user
            int assessmentId = Auth.AssessmentForUser();

            if (assessmentId != assessmentDetail.Id)
            {
                throw new CSETApplicationException("Not currently authorized to update the Assessment", null);
            }

            AssessmentManager assessmentManager = new AssessmentManager();

            return(assessmentManager.SaveAssessmentDetail(assessmentId, assessmentDetail));
        }