Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 어드민 계정 유저 아이디 변경으로 인한 리팩 #195

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

Expand All @@ -33,10 +34,10 @@ public class NoticeController {
@ApiOperation(value = "공지사항 작성")
@PostMapping(produces = "application/json; charset=utf-8")
public CommonResponse<NoticeDTO> postNotice(@AuthenticationPrincipal User authUser,
NoticeRequest noticeRequest) {
@RequestBody NoticeRequest noticeRequest) {

log.info("api = 공지사항 작성");
if (authUser.getId() != 9L) {
if (authUser.getId() != 1L) {
throw new ForbiddenException(ErrorCode.NOTICE_AUTH_ERROR.getErrorCode());
}
String title = noticeRequest.getTitle();
Expand Down