Merge branch 'BE/userinfo' into 'backend'

feat: qna 수정

See merge request s11-webmobile1-sub2/S11P12A701!106
This commit is contained in:
박정민 2024-08-08 13:05:30 +09:00
commit d0a73e0e72

View File

@ -75,13 +75,13 @@ public class QnaController {
if (findUser.getRole() != UserRole.ADMIN) {
System.out.println("role 안맞음");
throw new RuntimeException("update 실패");
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
}
QnaResponseDto responseDto = qnaService.updateAnswer(qna_id, qnaRequestDto);
return new ResponseEntity<>(responseDto, HttpStatus.ACCEPTED);
} catch (Exception e) {
throw new RuntimeException(e);
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
}
}
@ -126,7 +126,7 @@ public class QnaController {
return new ResponseEntity<>(HttpStatus.ACCEPTED);
} catch (SQLException e) {
throw new RuntimeException(e);
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
}
}
@ -137,7 +137,7 @@ public class QnaController {
return new ResponseEntity<>(findQna, HttpStatus.ACCEPTED);
} catch (SQLException e) {
throw new RuntimeException(e);
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
}
}
@ -150,7 +150,7 @@ public class QnaController {
return new ResponseEntity<>(qnaList, HttpStatus.ACCEPTED);
} catch (SQLException e) {
throw new RuntimeException(e);
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
}
}