Merge branch 'BE/userinfo' into 'backend'
feat: qna 수정 See merge request s11-webmobile1-sub2/S11P12A701!106
This commit is contained in:
commit
d0a73e0e72
@ -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