예제 #1
0
        public async Task <IActionResult> PostSubject(string ritmLogin, int semesterNumber, [FromBody] Subject subject)
        {
            try
            {
                var newSubject = await _studentsRepository.CreateSubject(ritmLogin, semesterNumber, subject);

                return(OkJson(newSubject));
            }
            catch (Exception e)
            {
                throw new Exception($"Exception when creating semester {ritmLogin} {semesterNumber}.", e);
            }
        }