예제 #1
0
        public async Task <IActionResult> ApproveTutor(int tutorId, [FromBody] string note)
        {
            try
            {
                var results = await _tutorService.ApproveAsync(tutorId, note);

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