feat: qna 수정
This commit is contained in:
parent
499afc2a76
commit
1567e6ce07
@ -75,13 +75,13 @@ public class QnaController {
|
|||||||
|
|
||||||
if (findUser.getRole() != UserRole.ADMIN) {
|
if (findUser.getRole() != UserRole.ADMIN) {
|
||||||
System.out.println("role 안맞음");
|
System.out.println("role 안맞음");
|
||||||
throw new RuntimeException("update 실패");
|
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
QnaResponseDto responseDto = qnaService.updateAnswer(qna_id, qnaRequestDto);
|
QnaResponseDto responseDto = qnaService.updateAnswer(qna_id, qnaRequestDto);
|
||||||
return new ResponseEntity<>(responseDto, HttpStatus.ACCEPTED);
|
return new ResponseEntity<>(responseDto, HttpStatus.ACCEPTED);
|
||||||
} catch (Exception e) {
|
} 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);
|
return new ResponseEntity<>(HttpStatus.ACCEPTED);
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} 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);
|
return new ResponseEntity<>(findQna, HttpStatus.ACCEPTED);
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} 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);
|
return new ResponseEntity<>(qnaList, HttpStatus.ACCEPTED);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException(e);
|
return new ResponseEntity<>(HttpStatus.NOT_ACCEPTABLE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user