Пример #1
0
        public IActionResult AlertActivity(int activityID)
        {
            if (!HttpContext.Session.IsStudent())
            {
                return(Unauthorized());
            }

            try
            {
                studentService.AlertActivity(HttpContext.Session.GetStudentId(), activityID);
                return(Ok(new { status = "uspelo" }));
            }
            catch (Exception ex)
            {
                return(Ok(new { status = "nije uspelo", message = ex.Message }));
            }
        }