示例#1
0
        public async Task <IActionResult> DeactiveTutor(int tutorId, [FromBody] string note)
        {
            try
            {
                var results = await _tutorService.DeactiveAsync(tutorId, note);

                return(Ok(results));
            }
            catch (NotFoundException)
            {
                return(NotFound());
            }
            catch (BadRequestException ex)
            {
                return(BadRequest(ex.Message));
            }
            catch (Exception ex)
            {
                _logger.LogCritical($"RejectTutor() error {ex}");
                return(StatusCode(500, "Internal Server Error: " + ex.Message));
            }
        }