Skip to content

Commit

Permalink
refactor: 코드 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
hseong3243 committed Aug 13, 2024
1 parent abf8a53 commit 73e5ea3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
package com.thirdparty.ticketing.domain.waitingroom;

import lombok.RequiredArgsConstructor;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class WaitingAspect {

private final WaitingManager waitingManager;

private Object waitingRequest(ProceedingJoinPoint joinPoint) throws Throwable {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
String email = (String)authentication.getPrincipal();
String email = (String) authentication.getPrincipal();
UserInfo userInfo = new UserInfo(email);
if(waitingManager.isReadyToHandle(userInfo)){
if (waitingManager.isReadyToHandle(userInfo)) {
return joinPoint.proceed();
} else {
long waitingNumber = waitingManager.enterWaitingRoom(userInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public interface WaitingLine {

/**
* 사용자를 대기열에 넣는다.
*
* @param userInfo 사용자의 정보
* @param waitingCounter 사용자의 고유한 카운트 값
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public abstract class WaitingRoom {

/**
* 사용자를 대기열에 넣고, 대기공간에 보관한다.
*
* @param userInfo 사용자의 정보
* @return 사용자의 남은 순번을 반환한다.
*/
Expand Down

0 comments on commit 73e5ea3

Please sign in to comment.