Skip to content

Commit

Permalink
style : 코드 포맷팅
Browse files Browse the repository at this point in the history
  • Loading branch information
dlswns2480 committed Jan 17, 2024
1 parent 1f04832 commit 77636fc
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/docs/asciidoc/api/waiting/waiting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ include::{snippets}/member-waiting-controller-docs-test/cancel-waiting/http-requ
include::{snippets}/member-waiting-controller-docs-test/cancel-waiting/http-response.adoc[]
include::{snippets}/member-waiting-controller-docs-test/cancel-waiting/response-fields.adoc[]


=== 웨이팅 입장 API

==== HTTP Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public RefreshToken getRefreshTokenByToken(String refreshToken) {
}

@Transactional
public void deleteRefreshToken(String email){
public void deleteRefreshToken(String email) {
refreshTokenRepository.deleteRefreshTokenByEmail(email);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public class MemberController {
private final MemberService memberService;

@GetMapping("/login/kakao")
public ResponseEntity<?> loginRedirect(){
public ResponseEntity<?> loginRedirect() {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setLocation(URI.create("/oauth2/authorization/kakao"));
return new ResponseEntity<>(httpHeaders, HttpStatus.MOVED_PERMANENTLY);
}

@PostMapping("/logout")
public ResponseEntity<String> logout(@LogIn Member member){
public ResponseEntity<String> logout(@LogIn Member member) {
memberService.logout(member.getEmail());
return ResponseEntity.ok("logout");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Token oauthLogin(OAuthAttribute attributes) {
}

@Transactional
public void logout(String email){
public void logout(String email) {
refreshTokenService.deleteRefreshToken(email);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public ResponseEntity<Token> login(@Valid @RequestBody LoginOwnerRequest loginOw
}

@PostMapping("/logout")
public ResponseEntity<String> logout(@LogIn Owner owner){
public ResponseEntity<String> logout(@LogIn Owner owner) {
ownerService.logout(owner.getEmail());
return ResponseEntity.ok("logout");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public Token loginOwner(LoginOwnerRequest loginRequest) {
}

@Transactional
public void logout(String email){
public void logout(String email) {
refreshTokenService.deleteRefreshToken(email);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/prgrms/catchtable/shop/domain/Shop.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Shop(String name, BigDecimal rating, Category category, Address address,
public int findWaitingNumber() {
return ++waitingCount;
}

public void updateMenuList(List<Menu> menuList) {
this.menuList.addAll(menuList);
this.menuList.forEach(menu -> menu.insertShop(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ void modifyReservation() throws Exception {
ReservationTime reservationTime = reservationTimeRepository.findAll().get(0);
Member member1 = memberRepository.findAll().get(0);
reservationTime.setOccupiedTrue();
Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime, member1);
Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime,
member1);
Reservation savedReservation = reservationRepository.save(reservation);
/**
* 수정하려는 예약시간 예제 데이터 생성
Expand Down Expand Up @@ -206,7 +207,8 @@ void modifyReservation() throws Exception {
void cancelReservation() throws Exception {
ReservationTime reservationTime = reservationTimeRepository.findAll().get(0);
Member member1 = memberRepository.findAll().get(0);
Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime, member1);
Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime,
member1);
Reservation savedReservation = reservationRepository.save(reservation);

mockMvc.perform(delete("/reservations/{reservationId}", savedReservation.getId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void setUp() {
Member member = MemberFixture.member("[email protected]");
Member savedMember = memberRepository.save(member);
Reservation reservation = reservationRepository.save(
ReservationFixture.getReservationWithMember(savedReservationTime,savedMember));
ReservationFixture.getReservationWithMember(savedReservationTime, savedMember));

ReservationTime reservationTime2 = ReservationFixture.getAnotherReservationTimeNotPreOccupied();
reservationTime2.insertShop(shop);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static com.prgrms.catchtable.reservation.domain.ReservationStatus.COMPLETED;

import com.prgrms.catchtable.common.data.shop.ShopData;
import com.prgrms.catchtable.member.MemberFixture;
import com.prgrms.catchtable.member.domain.Member;
import com.prgrms.catchtable.reservation.domain.Reservation;
import com.prgrms.catchtable.reservation.domain.ReservationStatus;
Expand Down Expand Up @@ -109,7 +108,8 @@ public static Reservation getReservation(ReservationTime reservationTime, Member
.build();
}

public static Reservation getReservationWithMember(ReservationTime reservationTime, Member member) {
public static Reservation getReservationWithMember(ReservationTime reservationTime,
Member member) {
if (!reservationTime.isOccupied()) {
reservationTime.setOccupiedTrue();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ void findByIdWithReservationTimeAndShop() {
Member member = MemberFixture.member("[email protected]");
Member savedMember = memberRepository.save(member);

Reservation reservation = ReservationFixture.getReservationWithMember(savedReservationTime, savedMember);
Reservation reservation = ReservationFixture.getReservationWithMember(savedReservationTime,
savedMember);
Reservation savedReservation = reservationRepository.save(reservation);

Reservation findReservation = reservationRepository.findByIdWithReservationTimeAndShop(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ void modifyReservation() {
ReservationTime modifyTime = ReservationFixture.getAnotherReservationTimeNotPreOccupied();
ReflectionTestUtils.setField(modifyTime, "id", 2L); //수정하려는 예약시간 객체 -> Id : 2

Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime, MemberFixture.member("[email protected]"));
Reservation reservation = ReservationFixture.getReservationWithMember(reservationTime,
MemberFixture.member("[email protected]"));
ModifyReservationRequest request = ReservationFixture.getModifyReservationRequest(
2L);

Expand Down

0 comments on commit 77636fc

Please sign in to comment.