Пример #1
0
        public async Task <ActionResult> FillWhoWereAbsent(JournalInputModel inputModel)
        {
            if (inputModel == null)
            {
                return(BadRequest("Model is empty"));
            }
            List <Journal> journals = JournalMapper.ToModel(inputModel);
            bool           belong   = await groupStorage.GetBelongnessOfGroupToTheTeacher(inputModel.GroupId, inputModel.TeacherId);

            if (belong)
            {
                lessonStorage.FillWhoWhereAbsent(journals); return(Ok());
            }
            else
            {
                return(BadRequest(("Failed to fill")));
            }
        }