Пример #1
0
        public async Task <IActionResult> Unsubcribe(int id)
        {
            var subject = await _subjectManager.GetSubjectAsync(id);

            if (subject == null)
            {
                return(NotFound());
            }

            var user = await GetCurrentUser();

            await _subjectManager.UnsubcribeAsync(new ClassRoomSubject()
            {
                ClassRoomId = user.ClassRoomId,
                SubjectId   = id
            });

            return(Ok());
        }