diff --git a/fastapi/app/db/crud_room_score.py b/fastapi/app/db/crud_room_score.py
index e212e90..4881a69 100644
--- a/fastapi/app/db/crud_room_score.py
+++ b/fastapi/app/db/crud_room_score.py
@@ -556,7 +556,7 @@ async def update_participant_role(data, db):
"room_seq": data['room_seq'],
"participant_type": data['participant_type'],
"target_user_seq": data['target_user_seq'],
- "team_name": data['team_name'],
+ "team_name": data.get('team_name', ''),
}
try:
db.execute(query, params)
diff --git a/fastapi/app/process/certification/cert_process.py b/fastapi/app/process/certification/cert_process.py
index 7b50850..4c067e4 100644
--- a/fastapi/app/process/certification/cert_process.py
+++ b/fastapi/app/process/certification/cert_process.py
@@ -101,13 +101,13 @@ def renew_cert(request: Request):
return {
"result": "TOKEN_EXPIRED",
"data": make_auth_data(user_seq=user_seq, token='', tf='N'),
- "msg": '인증서 토큰이 만료 되었습니다.'
+ "msg": 'The authentication token has expired.'
}
elif decoded_payload['result'] == 'TOKEN_EXPIRED':
return {
"result": "TOKEN_EXPIRED",
"data": make_auth_data(user_seq=user_seq, token='', tf='N'),
- "msg": '인증서 토큰이 만료 되었습니다.'
+ "msg": 'The authentication token has expired.'
}
else:
return {
@@ -121,7 +121,7 @@ def renew_cert(request: Request):
return {
"result": "FAIL",
"data": make_auth_data(user_seq=user_seq, token='', tf='N'),
- "msg": '인증서 토큰 갱신에 실패했습니다.'
+ "msg": 'Failed to renew the authentication token.'
}
diff --git a/fastapi/app/process/email/email_user.py b/fastapi/app/process/email/email_user.py
index 2a43244..1343666 100644
--- a/fastapi/app/process/email/email_user.py
+++ b/fastapi/app/process/email/email_user.py
@@ -91,7 +91,7 @@ def email_find_id(user_email, info):
# 비밀번호 찾기 이메일 발송 함수
def email_find_password(user_email, info):
context = {
- "email_title": "[유어라운드] 임시 비밀번호가 발급되었습니다.",
+ "email_title": "[ALLSCORE] 임시 비밀번호가 발급되었습니다.",
"info": info,
"user_email": user_email,
"template_name": "find_password_template.html",
diff --git a/fastapi/app/process/email/find_id_template.html b/fastapi/app/process/email/find_id_template.html
index 19d334e..e7ce2b3 100644
--- a/fastapi/app/process/email/find_id_template.html
+++ b/fastapi/app/process/email/find_id_template.html
@@ -9,14 +9,14 @@
- 고객님의 아이디는 다음과 같습니다.
+ Your ID is as follows.
{{ info }}
|
- 본 메일은 발신 전용으로 회신되지 않습니다.
+ This email is for sending purposes only and cannot be replied to.
|
diff --git a/fastapi/app/process/email/find_password_template.html b/fastapi/app/process/email/find_password_template.html
index c7ff349..bea7544 100644
--- a/fastapi/app/process/email/find_password_template.html
+++ b/fastapi/app/process/email/find_password_template.html
@@ -9,15 +9,15 @@
- 고객님의 임시 비밀번호는 다음과 같습니다.
+ Your temporary password is as follows.
{{ info }}
- 임시 비밀번호로 로그인 한 후 마이페이지에서 비밀번호를 변경해 주세요.
+ Please log in with your temporary password and change your password in the My Page.
|
- 본 메일은 발신 전용으로 회신되지 않습니다.
+ This email is for sending purposes only and cannot be replied to.
|
diff --git a/fastapi/app/process/firebase/firebase_process.py b/fastapi/app/process/firebase/firebase_process.py
index 97433ad..1baee19 100644
--- a/fastapi/app/process/firebase/firebase_process.py
+++ b/fastapi/app/process/firebase/firebase_process.py
@@ -23,13 +23,13 @@ async def update_room_setting_info(room_seq, data):
})
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/score\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -40,13 +40,13 @@ async def update_firebase_score(room_seq, user_seq, newScore):
ref.update({"score": int(newScore)})
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/score\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -100,13 +100,13 @@ async def create_firebase_room(data):
return {
"result": "OK",
- "msg": "방 생성 성공"
+ "msg": "Room creation successful" # (원본: "방 생성 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/create/firebase/room\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "방 생성 실패"
+ "msg": "Room creation failed" # (원본: "방 생성 실패")
}
@@ -141,7 +141,7 @@ def set_room_setting_info(body):
logger.error(f"request error. URL: /room/score/update/room/setting/info\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "파이어베이스 업데이트 실패"
+ "msg": "Firebase update failed" # (원본: "파이어베이스 업데이트 실패")
}
@@ -155,13 +155,13 @@ async def update_participant_role(data):
})
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/user/role\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -182,7 +182,7 @@ async def update_team_name(data):
else:
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
ref = frd_db.reference("rooms").child(f"korea-{data['room_seq']}").child("roomInfo")
@@ -205,13 +205,13 @@ async def update_team_name(data):
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/team/name\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
# 파이어베이스 팀명 확인
@@ -223,17 +223,17 @@ async def check_granted_team_name(room_seq):
if user_info['team_name'] == 'WAIT':
return {
"result": "FAIL",
- "msg": "대기중인 참가자가 있습니다."
+ "msg": "A participant is waiting." # (원본: "대기중인 참가자가 있습니다.")
}
return {
"result": "OK",
- "msg": "대기중인 참가자가 없습니다."
+ "msg": "No participant is waiting." # (원본: "대기중인 참가자가 없습니다.")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/check/granted/team/name\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "팀명 확인 실패"
+ "msg": "Team name check failed" # (원본: "팀명 확인 실패")
}
# 파이어베이스 방 상태 및 시작시간 업데이트
@@ -246,13 +246,13 @@ async def update_room_status_start_dt(data):
})
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/room/status\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -266,13 +266,13 @@ async def update_room_status_end_dt(data):
})
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/room/status/end/dt\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -283,13 +283,13 @@ async def delete_room_score_frd(room_seq):
ref.delete()
return {
"result": "OK",
- "msg": "삭제 성공"
+ "msg": "Delete successful" # (원본: "삭제 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/delete/room/frd\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "삭제 실패"
+ "msg": "Delete failed" # (원본: "삭제 실패")
}
@@ -301,7 +301,7 @@ async def update_exit_participant(data):
logger.error("user_seq is empty or invalid.")
return {
"result": "FAIL",
- "msg": "user_seq is empty or invalid."
+ "msg": "user_seq is empty or invalid." # (원본: "user_seq is empty or invalid.")
}
ref = frd_db.reference("rooms").child(f"korea-{data['room_seq']}").child("userInfo")
@@ -312,13 +312,13 @@ async def update_exit_participant(data):
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/update/participant\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -333,7 +333,7 @@ async def enter_room_user(room_seq, user_info):
if ref_list.child(f"_{user_info['user_seq']}").get() is not None:
return {
"result": "OK",
- "msg": "재입장 성공"
+ "msg": "Re-enter successful" # (원본: "재입장 성공")
}
ref_info = frd_db.reference("rooms").child(f"korea-{room_seq}").child("userInfo").child(f"_{user_info['user_seq']}")
@@ -341,13 +341,13 @@ async def enter_room_user(room_seq, user_info):
return {
"result": "OK",
- "msg": "업데이트 성공"
+ "msg": "Update successful" # (원본: "업데이트 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/enter/room/user\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
@@ -362,13 +362,13 @@ async def kick_participant(data):
return {
"result": "OK",
- "msg": "강퇴 성공"
+ "msg": "Kick success" # (원본: "강퇴 성공")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/kick/participant\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "강퇴 실패"
+ "msg": "Kick failed" # (원본: "강퇴 실패")
}
@@ -380,7 +380,7 @@ async def check_kick_user(user_seq, room_seq):
logger.error("user_seq is empty or invalid.")
return {
"result": "FAIL",
- "msg": "user_seq is empty or invalid."
+ "msg": "user_seq is empty or invalid." # (원본: "user_seq is empty or invalid.")
}
ref = frd_db.reference("rooms").child(f"korea-{room_seq}").child("userList").child(user_seq)
@@ -389,24 +389,24 @@ async def check_kick_user(user_seq, room_seq):
if user_info is None:
return {
"result": "FAIL",
- "msg": "강퇴된 유저가 아님"
+ "msg": "Not a kicked user" # (원본: "강퇴된 유저가 아님")
}
if not user_info:
return {
"result": "OK",
- "msg": "강퇴된 유저"
+ "msg": "Kicked user" # (원본: "강퇴된 유저")
}
else:
return {
"result": "FAIL",
- "msg": "강퇴된 유저가 아님"
+ "msg": "Not a kicked user" # (원본: "강퇴된 유저가 아님")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/check/kick/user\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "강퇴된 유저 확인 실패"
+ "msg": "Failed to check kicked user" # (원본: "강퇴된 유저 확인 실패")
}
@@ -419,19 +419,18 @@ async def check_force_exit_yn(user_seq, data):
if ref.get() is True:
return {
"result": "OK",
- "msg": "강제종료 된 유저",
+ "msg": "Force-exited user", # (원본: "강제종료 된 유저")
"room_seq": room_seq,
"room_type_name": room_type_name,
"room_title": room_title
}
return {
"result": "FAIL",
- "msg": "강제종료 된 유저가 아님"
+ "msg": "Not a force-exited user" # (원본: "강제종료 된 유저가 아님")
}
except Exception as e:
logger.error(f"request error. URL: /room/score/check/force/exit/yn\nerror message: {e}")
return {
"result": "FAIL",
- "msg": "업데이트 실패"
+ "msg": "Update failed" # (원본: "업데이트 실패")
}
-
diff --git a/fastapi/app/process/response/response.py b/fastapi/app/process/response/response.py
index dda621f..1ec1d1c 100644
--- a/fastapi/app/process/response/response.py
+++ b/fastapi/app/process/response/response.py
@@ -17,25 +17,27 @@ async def ok_res(auth_token, data, db):
except Exception as e:
logger.error(f"ok response error: {e}")
- return make_response('ERROR', 'N', 'NOMAL', '', 0, '응답 에러', '서버 장애가 발생했습니다.', data)
+ return make_response('ERROR', 'N', 'NOMAL', '', 0, 'Response Error', 'A server error has occurred.', data)
# 실패 응답
async def fail_res(auth_token, auth_type, msg_title, msg_content, data):
try:
+ # logger.error(f"response fail => msg_title: {msg_title}, msg_content: {msg_content}")
return make_response('FAIL', auth_token['renew_yn'], auth_type, auth_token['token'], auth_token['user_seq'], msg_title, msg_content, data)
except Exception as e:
logger.error(f"ok response error: {e}")
- return make_response('ERROR', 'N', 'NOMAL', '', 0, '응답 에러', '서버 장애가 발생했습니다.', data)
+ return make_response('ERROR', 'N', 'NOMAL', '', 0, 'Response Error', 'A server error has occurred.', data)
# 에러 응답
async def error_res(auth_token, auth_type, msg_title, msg_content, data):
try:
+ # logger.error(f"response error => msg_title: {msg_title}, msg_content: {msg_content}")
return make_response('ERROR', auth_token['renew_yn'], auth_type, auth_token['token'], auth_token['user_seq'], msg_title, msg_content, data)
except Exception as e:
logger.error(f"ok response error: {e}")
- return make_response('ERROR', 'N', 'NOMAL', '', 0, '응답 에러', '서버 장애가 발생했습니다.', data)
+ return make_response('ERROR', 'N', 'NOMAL', '', 0, 'Response Error', 'A server error has occurred.', data)
diff --git a/fastapi/app/process/room/room_score_pattern.py b/fastapi/app/process/room/room_score_pattern.py
index d83ee51..56da014 100644
--- a/fastapi/app/process/room/room_score_pattern.py
+++ b/fastapi/app/process/room/room_score_pattern.py
@@ -6,67 +6,59 @@ from process.logger import logger
import re
-# 회원가입 입력항목 확인
+# Check membership sign-up input fields # 회원가입 입력항목 확인
async def verify_create_room_data(data, db):
- # room_type 체크
+ # Check room_type # room_type 체크
verify_room_type_result = await crud_room_score.verify_room_type(room_type=data['room_type'], db=db)
if verify_room_type_result[0][0] != 1:
- return 'room_type이 정확하지 않습니다.'
+ return 'room_type is incorrect.' # room_type이 정확하지 않습니다.
- # team전일 경우 팀수도 입력됐는지 체크
+ # Check if the number of teams is also entered for team match # team전일 경우 팀수도 입력됐는지 체크
if data['room_type'] == 'team':
if not 'number_of_teams' in data:
- return '팀전일 경우 팀수를 입력해야 합니다.'
+ return 'You must enter the number of teams if it is a team match.' # 팀전일 경우 팀수를 입력해야 합니다.
if not is_non_negative_integer(data['number_of_teams']):
- return '팀수는 정수이어야 하며, 1이상의 정수값만 가능합니다.'
+ return 'The number of teams must be an integer, and only values greater than or equal to 1 are allowed.' # 팀수는 정수이어야 하며, 1이상의 정수값만 가능합니다.
- # room_title 체크
+ # Check room_title # room_title 체크
if not (0 < len(data['room_title']) and len(data['room_title']) < 100):
- return '방 제목을 확인해주세요.'
+ return 'Please check the room title.' # 방 제목을 확인해주세요.
- # room_intro 체크
+ # Check room_intro # room_intro 체크
if not (0 < len(data['room_intro']) and len(data['room_intro']) < 1000):
- return '방 소개를 확인해주세요.'
+ return 'Please check the room introduction.' # 방 소개를 확인해주세요.
- # open_yn 체크
+ # Check open_yn # open_yn 체크
if not (data['open_yn'] == 'Y' or data['open_yn'] == 'N'):
- return '방 공개 여부를 확인해주세요.'
+ return 'Please check if the room is open.' # 방 공개 여부를 확인해주세요.
- # room_pw 체크
+ # Check room_pw # room_pw 체크
if data['open_yn'] == 'Y':
if not data['room_pw'] == '':
- return '공개 방입니다. 방 비밀번호를 확인해주세요.'
+ return 'This is a public room. Please check the room password.' # 공개 방입니다. 방 비밀번호를 확인해주세요.
if data['open_yn'] == 'N':
if not (0 < len(data['room_pw']) and len(data['room_pw']) < 100):
- return '방 비밀번호를 확인해주세요.'
+ return 'Please check the room password.' # 방 비밀번호를 확인해주세요.
- # running_time 체크
+ # Check running_time # running_time 체크
if not is_non_negative_integer(data['running_time']):
- return '운영시간을 확인해주세요.'
+ return 'Please check the running time.' # 운영시간을 확인해주세요.
- # room_status 체크
+ # Check room_status # room_status 체크
verify_room_status_result = await crud_room_score.verify_room_status(room_status=data['room_status'], db=db)
if verify_room_status_result[0][0] != 1:
- return 'room_status가 정확하지 않습니다.'
+ return 'room_status is incorrect.' # room_status가 정확하지 않습니다.
- # 이상 없으면 NONE리턴
+ # If there is no error, return None # 이상 없으면 NONE리턴
return None
def is_non_negative_integer(value):
try:
- # 정수로 변환 시도
+ # Attempt converting to an integer # 정수로 변환 시도
num = int(value)
- # 0 이상인지 확인
+ # Check if it's greater than or equal to 0 # 0 이상인지 확인
return num > 0
except (ValueError, TypeError):
return False
-
-
-
-
-
-
-
-
diff --git a/fastapi/app/process/user/manage_user_pattern.py b/fastapi/app/process/user/manage_user_pattern.py
index 1a5a636..df34f20 100644
--- a/fastapi/app/process/user/manage_user_pattern.py
+++ b/fastapi/app/process/user/manage_user_pattern.py
@@ -10,27 +10,27 @@ import re
def check_mandatory_insert_list(user_info):
# user_id 확인
if not validate_user_id(user_id=user_info['user_id']):
- return '아이디 규칙이 맞지 않습니다.'
+ return 'The user ID rule is incorrect.' # (원본: "아이디 규칙이 맞지 않습니다.")
# user_pw 확인
if not validate_user_pw(user_pw=user_info['user_pw']):
- return '비밀번호 암호화가 되지 않았습니다.'
+ return 'Password is not encrypted.' # (원본: "비밀번호 암호화가 되지 않았습니다.")
# nickname 확인
if not validate_nickname(nickname=user_info['nickname']):
- return '사용자 닉네임 규칙이 맞지 않습니다.'
+ return 'Nickname rule is incorrect.' # (원본: "사용자 닉네임 규칙이 맞지 않습니다.")
# user_email 확인
if not validate_user_email(user_email=user_info['user_email']):
- return '이메일 규칙이 맞지 않습니다.'
+ return 'The email rule is incorrect.' # (원본: "이메일 규칙이 맞지 않습니다.")
# introduce_myself 확인
if len(user_info['introduce_myself']) > 2000:
- return '자기소개 글은 2000byte까지만 입력 가능합니다.'
+ return 'Self-introduction can only be up to 2000 bytes.' # (원본: "자기소개 글은 2000byte까지만 입력 가능합니다.")
# mandatory_terms 확인
if user_info['mandatory_terms_yn'] != 'Y':
- return '필수약관항목에 대해 동의 하지 않았습니다.'
+ return 'You have not agreed to the mandatory terms.' # (원본: "필수약관항목에 대해 동의 하지 않았습니다.")
# 이상없음
return None
@@ -41,45 +41,45 @@ def check_new_data(user_info):
# user_pw 확인
if user_info['user_pw_change_yn'] == 'Y':
if not validate_user_pw(user_pw=user_info['user_pw']):
- return '비밀번호 암호화가 되지 않았습니다.'
+ return 'Password is not encrypted.' # (원본: "비밀번호 암호화가 되지 않았습니다.")
# nickname 확인
if not validate_nickname(nickname=user_info['nickname']):
- return '사용자 닉네임 규칙이 맞지 않습니다.'
+ return 'Nickname rule is incorrect.' # (원본: "사용자 닉네임 규칙이 맞지 않습니다.")
# user_email 확인
if not validate_user_email(user_email=user_info['user_email']):
- return '이메일 규칙이 맞지 않습니다.'
+ return 'The email rule is incorrect.' # (원본: "이메일 규칙이 맞지 않습니다.")
# profile_img 확인
if not starts_with_user_dir(user_info['profile_img']):
- return '프로필 이미지 경로가 정확하지 않습니다.'
+ return 'The profile image path is incorrect.' # (원본: "프로필 이미지 경로가 정확하지 않습니다.")
# introduce_myself 확인
if len(user_info['introduce_myself']) > 2000:
- return '자기소개 글은 2000byte까지만 입력 가능합니다.'
+ return 'Self-introduction can only be up to 2000 bytes.' # (원본: "자기소개 글은 2000byte까지만 입력 가능합니다.")
# 이상없음
return None
-# 회원정보 수정 입력값 검증
+# 회원정보 수정 입력값 검증 (소셜로그인)
def check_new_data_for_oauth(user_info):
# oauth 계정이 비밀번호 변경요청은 허용하지 않음
if user_info['user_pw_change_yn'] == 'Y':
- return '소셜로그인 계정은 비밀번호 변경을 허용하지 않습니다.'
+ return 'Social login accounts do not allow password changes.' # (원본: "소셜로그인 계정은 비밀번호 변경을 허용하지 않습니다.")
# nickname 확인
if not validate_nickname(nickname=user_info['nickname']):
- return '사용자 닉네임 규칙이 맞지 않습니다.'
+ return 'Nickname rule is incorrect.' # (원본: "사용자 닉네임 규칙이 맞지 않습니다.")
# profile_img 확인
if not starts_with_user_dir(user_info['profile_img']):
- return '프로필 이미지 경로가 정확하지 않습니다.'
+ return 'The profile image path is incorrect.' # (원본: "프로필 이미지 경로가 정확하지 않습니다.")
# introduce_myself 확인
if len(user_info['introduce_myself']) > 2000:
- return '자기소개 글은 2000byte까지만 입력 가능합니다.'
+ return 'Self-introduction can only be up to 2000 bytes.' # (원본: "자기소개 글은 2000byte까지만 입력 가능합니다.")
# 이상없음
return None
@@ -137,26 +137,3 @@ def starts_with_user_dir(value: str) -> bool:
prefix = '/user/temp_dir/profile_img/'
return value.startswith(prefix)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fastapi/app/router/inquiry_api.py b/fastapi/app/router/inquiry_api.py
index cb3c8a9..3a643f7 100644
--- a/fastapi/app/router/inquiry_api.py
+++ b/fastapi/app/router/inquiry_api.py
@@ -51,12 +51,14 @@ async def request_inquiry(request: Request, body: bytes = Depends(get_body), db:
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -72,7 +74,8 @@ async def request_inquiry(request: Request, body: bytes = Depends(get_body), db:
else:
return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='문의 저장 실패', msg_content='문의 저장 처리중 에러가 발생했습니다.', data={})
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
except Exception as e:
logger.error(f"request error. URL: /room/score/create/room\nerror message: {e}")
diff --git a/fastapi/app/router/manage_user_api.py b/fastapi/app/router/manage_user_api.py
index 46cbd68..50cad5c 100644
--- a/fastapi/app/router/manage_user_api.py
+++ b/fastapi/app/router/manage_user_api.py
@@ -62,7 +62,8 @@ async def google_login(request: Request, body: bytes = Depends(get_body), db: Se
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
# 2) request body 파싱
id_token_str = body.get('id_token', None)
@@ -115,7 +116,8 @@ async def google_signup(request: Request, body: bytes = Depends(get_body), db: S
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
id_token_str = body.get('id_token', None)
@@ -169,7 +171,8 @@ async def login(request: Request, body: bytes = Depends(get_body), db: Session =
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_id = body['user_id']
user_pw = body['user_pw']
@@ -212,7 +215,8 @@ async def find_id(request: Request, body: bytes = Depends(get_body), db: Session
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
nickname = body['nickname']
user_email = body['user_email']
@@ -265,7 +269,8 @@ async def find_receive_by_eamil(request: Request, body: bytes = Depends(get_body
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
auth = body['auth']
auth_data = cert_process.decode_jwt(auth)
@@ -278,7 +283,8 @@ async def find_receive_by_eamil(request: Request, body: bytes = Depends(get_body
if not(iat <= current_time and current_time <= exp):
return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='이메일 발송 실패', msg_content='토큰 유효기간이 만료되었습니다.', data={})
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# user_seq로 아이디 찾기 시도
find_id_result = await manage_user.find_id_by_user_seq(user_seq=user_seq, db=db)
@@ -327,7 +333,8 @@ async def find_pw(request: Request, body: bytes = Depends(get_body), db: Session
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_id = body['user_id']
user_email = body['user_email']
@@ -388,7 +395,8 @@ async def signup(request: Request, body: bytes = Depends(get_body), db: Session
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
logger.debug(f"body: {body}")
# user_id 유효성 검사
@@ -435,13 +443,15 @@ async def update_profile_img(request: Request, body: str = Form(...), file: Uplo
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
# 파일 읽기
content = await file.read()
@@ -485,7 +495,8 @@ async def update_profile_img(request: Request, body: str = Form(...), file: Uplo
else:
return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='이미지 업로드 실패', msg_content='이미지 업로드에 실패했습니다.', data={})
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
except Exception as e:
logger.error(f"request error. URL: /user/update/profile/img\nerror message: {e}")
@@ -505,12 +516,14 @@ async def update_user_info(request: Request, body: bytes = Depends(get_body), db
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -542,12 +555,14 @@ async def update_user_info(request: Request, body: bytes = Depends(get_body), db
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -607,7 +622,8 @@ async def update_user_info(request: Request, body: bytes = Depends(get_body), db
return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='회원정보 변경 실패', msg_content='회원정보 변경 실패했습니다. 관리자에게 문의해주세요.', data={})
else:
logger.error(f"request error. URL: /user/update/user/info\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
@@ -629,12 +645,14 @@ async def withdraw_user(request: Request, body: bytes = Depends(get_body), db: S
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_pw = body['user_pw']
oauth_type = body['oauth_type']
@@ -655,7 +673,8 @@ async def withdraw_user(request: Request, body: bytes = Depends(get_body), db: S
return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='회원탈퇴 에러', msg_content='회원탈퇴 처리중 에러가 발생헀습니다. 관리자에게 문의해주세요.', data={})
else:
logger.error(f"request error. URL: /user/withdraw/user\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
except Exception as e:
diff --git a/fastapi/app/router/room_score_api.py b/fastapi/app/router/room_score_api.py
index 084f2be..ae504d0 100644
--- a/fastapi/app/router/room_score_api.py
+++ b/fastapi/app/router/room_score_api.py
@@ -53,12 +53,28 @@ async def create_room(request: Request, body: bytes = Depends(get_body), db: Ses
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -67,12 +83,24 @@ async def create_room(request: Request, body: bytes = Depends(get_body), db: Ses
# 데이터 검증
verify_create_room_data_result = await room_score_pattern.verify_create_room_data(data=body, db=db)
if verify_create_room_data_result is not None:
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 생성 실패', msg_content=verify_create_room_data_result, data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room creation failed', # (원본: "방 생성 실패")
+ msg_content=verify_create_room_data_result,
+ data={}
+ )
# 이미 입장되어 있는 대기중인 방이 있는지 확인
check_already_enter_room_result = await room_score.check_already_enter_room(user_seq=user_seq, room_seq='0', db=db)
if check_already_enter_room_result['result'] == 'OK':
- msg_content = f'이미 입장되어 있는 대기중인 방이 있습니다.\n방제목은 아래와 같습니다.\n{check_already_enter_room_result["room_title"]}'
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 생성 실패', msg_content=msg_content, data={})
+ msg_content = f'A waiting room you have already joined is found.\nThe title is as follows.\n{check_already_enter_room_result["room_title"]}' # (원본: "이미 입장되어 있는 대기중인 방이 있습니다.\n방제목은 아래와 같습니다.\n")
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room creation failed', # (원본: "방 생성 실패")
+ msg_content=msg_content,
+ data={}
+ )
# 방 생성
body = setting_etc_data(data=body)
create_room_result = await room_score.create_room(data=body, db=db)
@@ -81,7 +109,13 @@ async def create_room(request: Request, body: bytes = Depends(get_body), db: Ses
if body['room_type'] == 'team' or body['room_type'] == 'TEAM':
insert_team_name_result = await room_score.insert_team_name(data=body, db=db)
if insert_team_name_result['result'] != 'OK':
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='팀 이름 입력 실패', msg_content='팀 이름 입력중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Team name input failed', # (원본: "팀 이름 입력 실패")
+ msg_content='An error occurred while entering the team name. Please contact the administrator.', # (원본: "팀 이름 입력중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# 방장 참여자 입력
insert_creater_user_participant_result = await room_score.insert_creater_user_participant(data=body, db=db)
if insert_creater_user_participant_result['result'] == 'OK':
@@ -90,53 +124,33 @@ async def create_room(request: Request, body: bytes = Depends(get_body), db: Ses
create_firebase_room_result = await firebase_process.create_firebase_room(data=body)
if create_firebase_room_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={"room_seq": body['room_seq']}, db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방생성 에러', msg_content='방 생성중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room creation error', # (원본: "방생성 에러")
+ msg_content='An error occurred during room creation. Please contact the administrator.', # (원본: "방 생성중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/create/room\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 생성 에러', msg_content='방 생성 처리중 에러가 발생했습니다.', data={})
-
-
-#==================================================================================================
-# 대기중인 방-개인 참가자 정보
-#==================================================================================================
-# @router.post("/waiting/room/private/info")
-# async def get_waiting_private_room_info(request: Request, body: bytes = Depends(get_body), db: Session = Depends(get_db)):
-# try:
-# # 인증서 갱신
-# auth_token = cert_process.renew_cert(request=request)
-# if auth_token['result'] == 'OK':
-# auth_token = auth_token['data']
-# elif auth_token['result'] == 'TOKEN_EXPIRED':
-# raise token_expired_return_process(auth_token['msg'])
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-# # body에서 ID 추출
-# try:
-# body = json.loads(body)
-# except json.JSONDecodeError as e:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
-
-# user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
-# if user_seq_result["result"] == 'OK':
-# user_seq = user_seq_result['data']['user_seq']
-# # 방 참여자 조회 권한 확인
-# check_auth_user_result = await room_score.check_auth_user(user_seq=user_seq, room_type='private', room_seq=body['room_seq'], db=db)
-# if check_auth_user_result == 'FAIL':
-# return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
-# # 참가자 정보 가져오기
-# participant_user_list_result = await room_score.participant_user_list(user_seq=user_seq, room_type='private', room_seq=body['room_seq'], db=db)
-# if participant_user_list_result['result'] == 'OK':
-# return await response.ok_res(auth_token=auth_token, data=participant_user_list_result['data'], db=db)
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 정보 조회 에러', msg_content='참가자 정보 조회중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-
-# except Exception as e:
-# logger.error(f"request error. URL: /room/score/waiting/room/private/info\nerror message: {e}")
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(대기중인 방-개인 참가자 정보) 에러', msg_content='(대기중인 방-개인 참가자 정보) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room creation error', # (원본: "방 생성 에러")
+ msg_content='An error occurred while creating the room.', # (원본: "방 생성 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -152,12 +166,28 @@ async def start_game(request: Request, body: bytes = Depends(get_body), db: Sess
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -168,16 +198,34 @@ async def start_game(request: Request, body: bytes = Depends(get_body), db: Sess
# 방 상태가 대기중 인지 확인
check_room_status_by_room_seq_room_status_result = await room_score.check_room_status_by_room_seq_room_status(room_seq=body['room_seq'], room_status='WAIT', db=db)
if check_room_status_by_room_seq_room_status_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 시작 실패', msg_content='게임 시작은 대기중 상태에서만 가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game start failed', # (원본: "게임 시작 실패")
+ msg_content='The game can only be started from the waiting state.', # (원본: "게임 시작은 대기중 상태에서만 가능합니다.")
+ data={}
+ )
# 팀전일 경우 team_name이 WAIT상태가 없는지 확인
if body['room_type'] == 'team' or body['room_type'] == 'TEAM':
check_granted_team_name_result = await room_score.check_granted_team_name(room_seq=body['room_seq'], db=db)
if check_granted_team_name_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 시작 실패', msg_content='팀전일 경우 팀배치가 완료되어야 시작가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game start failed', # (원본: "게임 시작 실패")
+ msg_content='For team matches, the team arrangement must be completed before starting.', # (원본: "팀전일 경우 팀배치가 완료되어야 시작가능합니다.")
+ data={}
+ )
# FRD에도 team_name이 WAIT상태가 없는지 확인
check_granted_team_name_result = await firebase_process.check_granted_team_name(room_seq=body['room_seq'])
if check_granted_team_name_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 시작 실패', msg_content='팀전일 경우 팀배치가 완료되어야 시작가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game start failed', # (원본: "게임 시작 실패")
+ msg_content='For team matches, the team arrangement must be completed before starting.', # (원본: "팀전일 경우 팀배치가 완료되어야 시작가능합니다.")
+ data={}
+ )
# 방 상태 RUNNING으로 변경 & 시작시간 업데이트
body['start_dt'] = datetime.datetime.now(KST).strftime('%Y-%m-%d %H:%M:%S')
update_room_status_start_dt_end_dt_result = await room_score.update_room_status_start_dt_end_dt(room_seq=body['room_seq'], room_status='RUNNING', start_dt=body['start_dt'], end_dt='', db=db)
@@ -188,17 +236,49 @@ async def start_game(request: Request, body: bytes = Depends(get_body), db: Sess
if update_firebase_room_status_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 상태 업데이트 에러', msg_content='방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room status update error', # (원본: "방 상태 업데이트 에러")
+ msg_content='An error occurred while updating the room status. Please contact the administrator.', # (원본: "방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='시작시간 업데이트 에러', msg_content='시작시간 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Start time update error', # (원본: "시작시간 업데이트 에러")
+ msg_content='An error occurred while updating the start time. Please contact the administrator.', # (원본: "시작시간 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 시작처리 에러', msg_content='방장에게만 게임시작 권한이 있습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game start error', # (원본: "게임 시작처리 에러")
+ msg_content='Only the host has permission to start the game.', # (원본: "방장에게만 게임시작 권한이 있습니다.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/game/start\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(대기중인 방-게임 시작하기) 에러', msg_content='(대기중인 방-게임 시작하기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Waiting room - Start game) Error', # (원본: "(대기중인 방-게임 시작하기) 에러")
+ msg_content='An error occurred while starting the game in the waiting room.', # (원본: "(대기중인 방-게임 시작하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -214,12 +294,28 @@ async def finish_game(request: Request, body: bytes = Depends(get_body), db: Ses
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -230,7 +326,13 @@ async def finish_game(request: Request, body: bytes = Depends(get_body), db: Ses
# 방 상태가 진행중 인지 확인
check_room_status_by_room_seq_room_status_result = await room_score.check_room_status_by_room_seq_room_status(room_seq=body['room_seq'], room_status='RUNNING', db=db)
if check_room_status_by_room_seq_room_status_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 종료 실패', msg_content='게임 종료는 진행중 상태에서만 가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game finish failed', # (원본: "게임 종료 실패")
+ msg_content='The game can only be finished when it is in progress.', # (원본: "게임 종료는 진행중 상태에서만 가능합니다.")
+ data={}
+ )
# 방 상태 FINISH로 변경 & 종료시간 업데이트
body['end_dt'] = datetime.datetime.now(KST).strftime('%Y-%m-%d %H:%M:%S')
update_room_status_start_dt_end_dt_result = await room_score.update_room_status_start_dt_end_dt(room_seq=body['room_seq'], room_status='FINISH', start_dt='', end_dt=body['end_dt'], db=db)
@@ -244,19 +346,57 @@ async def finish_game(request: Request, body: bytes = Depends(get_body), db: Ses
if update_firebase_room_status_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 상태 업데이트 에러', msg_content='방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room status update error', # (원본: "방 상태 업데이트 에러")
+ msg_content='An error occurred while updating the room status. Please contact the administrator.', # (원본: "방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 상태 업데이트 에러', msg_content='방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room status update error', # (원본: "방 상태 업데이트 에러")
+ msg_content='An error occurred while updating the room status. Please contact the administrator.', # (원본: "방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 시작처리 에러', msg_content='게임 시작처리중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game start error', # (원본: "게임 시작처리 에러")
+ msg_content='An error occurred while starting the game. Please contact the administrator.', # (원본: "게임 시작처리중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='게임 시작처리 에러', msg_content='방장에게만 게임시작 권한이 있습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Game start error', # (원본: "게임 시작처리 에러")
+ msg_content='Only the host has permission to start the game.', # (원본: "방장에게만 게임시작 권한이 있습니다.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/game/finish\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(진행중인 방-게임 종료) 에러', msg_content='(진행중인 방-게임 종료) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(In-progress room - Finish game) Error', # (원본: "(진행중인 방-게임 종료) 에러")
+ msg_content='An error occurred while finishing the in-progress game.', # (원본: "(진행중인 방-게임 종료) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -272,12 +412,28 @@ async def leave_game(request: Request, body: bytes = Depends(get_body), db: Sess
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -289,7 +445,13 @@ async def leave_game(request: Request, body: bytes = Depends(get_body), db: Sess
# 방 상태가 대기중 인지 확인
check_room_status_by_room_seq_room_status_result = await room_score.check_room_status_by_room_seq_room_status(room_seq=body['room_seq'], room_status='WAIT', db=db)
if check_room_status_by_room_seq_room_status_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 나가기 실패', msg_content='방 나가기는 대기중 상태에서만 가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Leave room failed', # (원본: "방 나가기 실패")
+ msg_content='You can only leave the room in the waiting state.', # (원본: "방 나가기는 대기중 상태에서만 가능합니다.")
+ data={}
+ )
# 요청자가 방장인지 확인
check_requester_room_master_auth_result = await room_score.check_requester_room_master_auth(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if check_requester_room_master_auth_result['result'] == 'OK':
@@ -301,7 +463,13 @@ async def leave_game(request: Request, body: bytes = Depends(get_body), db: Sess
if delete_room_score_frd_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 나가기 실패', msg_content='방 나가기중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Leave room failed', # (원본: "방 나가기 실패")
+ msg_content='An error occurred while leaving the room. Please contact the administrator.', # (원본: "방 나가기중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# 일반 참여자가 방나가기 했을 경우
delete_room_score_participant_result = await room_score.delete_room_score_participant(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if delete_room_score_participant_result['result'] == 'OK':
@@ -311,17 +479,49 @@ async def leave_game(request: Request, body: bytes = Depends(get_body), db: Sess
if update_firebase_participant_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 상태 업데이트 에러', msg_content='방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room status update error', # (원본: "방 상태 업데이트 에러")
+ msg_content='An error occurred while updating the room status. Please contact the administrator.', # (원본: "방 상태 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 나가기 실패', msg_content='방 나가기중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Leave room failed', # (원본: "방 나가기 실패")
+ msg_content='An error occurred while leaving the room. Please contact the administrator.', # (원본: "방 나가기중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 나가기 실패', msg_content='방장에게만 방 나가기 권한이 있습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Leave room failed', # (원본: "방 나가기 실패")
+ msg_content='Only the host has permission to leave the room.', # (원본: "방장에게만 방 나가기 권한이 있습니다.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/game/leave\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(대기중인 방-게임 나가기) 에러', msg_content='(대기중인 방-게임 나가기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Waiting room - Leave game) Error', # (원본: "(대기중인 방-게임 나가기) 에러")
+ msg_content='An error occurred while leaving the waiting room.', # (원본: "(대기중인 방-게임 나가기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -337,23 +537,53 @@ async def check_connected_user(request: Request, body: bytes = Depends(get_body)
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
user_seq = user_seq_result['data']['user_seq']
# KAFKA 연결 여부 업데이트
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/check/connected/user\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(연결중인 사용자 확인) 에러', msg_content='(연결중인 사용자 확인) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Check connected user) Error', # (원본: "(연결중인 사용자 확인) 에러")
+ msg_content='An error occurred while checking the connected user.', # (원본: "(연결중인 사용자 확인) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -369,12 +599,28 @@ async def kick_participant(request: Request, body: bytes = Depends(get_body), db
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -391,98 +637,49 @@ async def kick_participant(request: Request, body: bytes = Depends(get_body), db
if kick_participant_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참여자 강퇴 실패', msg_content='참여자 강퇴중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant kick failed', # (원본: "참여자 강퇴 실패")
+ msg_content='An error occurred while kicking the participant. Please contact the administrator.', # (원본: "참여자 강퇴중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참여자 강퇴 실패', msg_content='참여자 강퇴중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant kick failed', # (원본: "참여자 강퇴 실패")
+ msg_content='An error occurred while kicking the participant. Please contact the administrator.', # (원본: "참여자 강퇴중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참여자 강퇴 실패', msg_content='참여자 강퇴 권한이 없습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant kick failed', # (원본: "참여자 강퇴 실패")
+ msg_content='You do not have permission to kick participants.', # (원본: "참여자 강퇴 권한이 없습니다.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/kick/participant\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(참여자 강퇴하기) 에러', msg_content='(참여자 강퇴하기) 처리중 에러가 발생했습니다.', data={})
-
-
-#==================================================================================================
-# 대기중인 방-팀 참가자 정보
-#==================================================================================================
-# @router.post("/waiting/room/team/info")
-# async def get_waiting_team_room_info(request: Request, body: bytes = Depends(get_body), db: Session = Depends(get_db)):
-# try:
-# # 인증서 갱신
-# auth_token = cert_process.renew_cert(request=request)
-# if auth_token['result'] == 'OK':
-# auth_token = auth_token['data']
-# elif auth_token['result'] == 'TOKEN_EXPIRED':
-# raise token_expired_return_process(auth_token['msg'])
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-# # body에서 ID 추출
-# try:
-# body = json.loads(body)
-# except json.JSONDecodeError as e:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
-
-# user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
-# if user_seq_result["result"] == 'OK':
-# user_seq = user_seq_result['data']['user_seq']
-# body['user_seq'] = user_seq
-# # 방 참여자 조회 권한 확인
-# check_auth_user_result = await room_score.check_auth_user(user_seq=user_seq, room_type='team', room_seq=body['room_seq'], db=db)
-# if check_auth_user_result == 'FAIL':
-# return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
-# # 참가자 정보 가져오기
-# participant_user_list_result = await room_score.participant_user_list(user_seq=user_seq, room_type='team', room_seq=body['room_seq'], db=db)
-# if participant_user_list_result['result'] == 'OK':
-# return await response.ok_res(auth_token=auth_token, data=participant_user_list_result['data'], db=db)
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 정보 조회 에러', msg_content='참가자 정보 조회중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-
-# except Exception as e:
-# logger.error(f"request error. URL: /room/score/waiting/room/team/info\nerror message: {e}")
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(대기중인 방-팀 참가자 정보) 에러', msg_content='(대기중인 방-팀 참가자 정보) 처리중 에러가 발생했습니다.', data={})
-
-
-#==================================================================================================
-# 방 설정정보 가져오기
-#==================================================================================================
-# @router.post("/room/setting/info")
-# async def get_room_setting_info(request: Request, body: bytes = Depends(get_body), db: Session = Depends(get_db)):
-# try:
-# # 인증서 갱신
-# auth_token = cert_process.renew_cert(request=request)
-# if auth_token['result'] == 'OK':
-# auth_token = auth_token['data']
-# elif auth_token['result'] == 'TOKEN_EXPIRED':
-# raise token_expired_return_process(auth_token['msg'])
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-# # body에서 ID 추출
-# try:
-# body = json.loads(body)
-# except json.JSONDecodeError as e:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
-
-# user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
-# if user_seq_result["result"] == 'OK':
-# user_seq = user_seq_result['data']['user_seq']
-# # 방 참여자 조회 권한 확인
-# check_auth_user_result = await room_score.check_auth_user(user_seq=user_seq, room_type=body['room_type'], room_seq=body['room_seq'], db=db)
-# if check_auth_user_result == 'FAIL':
-# return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
-# # 방 설정정보 가져오기
-# select_room_setting_info_result = await room_score.select_room_setting_info(user_seq=user_seq, room_seq=body['room_seq'], db=db)
-# if select_room_setting_info_result['result'] == 'OK':
-# return await response.ok_res(auth_token=auth_token, data=select_room_setting_info_result['data'], db=db)
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 설정정보 조회 에러', msg_content='방 설정정보 조회중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-
-# except Exception as e:
-# logger.error(f"request error. URL: /room/score/room/setting/info\nerror message: {e}")
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(방 설정정보 가져오기) 에러', msg_content='(방 설정정보 가져오기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Kick participant) Error', # (원본: "(참여자 강퇴하기) 에러")
+ msg_content='An error occurred while kicking the participant.', # (원본: "(참여자 강퇴하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -498,12 +695,28 @@ async def update_room_setting_info(request: Request, body: bytes = Depends(get_b
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -511,7 +724,13 @@ async def update_room_setting_info(request: Request, body: bytes = Depends(get_b
# 방 참여자 조회 권한 확인
check_auth_user_result = await room_score.check_auth_user(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if check_auth_user_result == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant view failed', # (원본: "참가자 조회 실패")
+ msg_content='You do not have permission to view participants.', # (원본: "참가자 조회 권한이 없습니다.")
+ data={}
+ )
# 방 설정정보 가져오기
select_room_setting_info_result = await room_score.select_room_setting_info(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if select_room_setting_info_result['result'] == 'OK':
@@ -522,7 +741,13 @@ async def update_room_setting_info(request: Request, body: bytes = Depends(get_b
if set_room_setting_info_result['result'] == 'OK':
body = set_room_setting_info_result['data']
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='파이어베이스 방 설정 업데이트 에러', msg_content='파이어베이스 방 설정 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Firebase room setting update error', # (원본: "파이어베이스 방 설정 업데이트 에러")
+ msg_content='An error occurred while updating the Firebase room settings. Please contact the administrator.', # (원본: "파이어베이스 방 설정 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
update_room_setting_info_result = await room_score.update_room_setting_info(data=body, db=db)
if update_room_setting_info_result['result'] == 'OK':
# 파이어베이스 방 설정 업데이트
@@ -530,18 +755,56 @@ async def update_room_setting_info(request: Request, body: bytes = Depends(get_b
if firebase_update_room_setting_info_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 설정 업데이트 에러', msg_content='방 설정 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room setting update error', # (원본: "방 설정 업데이트 에러")
+ msg_content='An error occurred while updating the room settings. Please contact the administrator.', # (원본: "방 설정 업데이트중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 설정정보 수정 에러', msg_content='방 설정정보 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room setting modification error', # (원본: "방 설정정보 수정 에러")
+ msg_content='An error occurred while modifying the room settings. Please contact the administrator.', # (원본: "방 설정정보 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 설정정보 수정 실패', msg_content='방 설정정보 수정 권한이 없습니다.', data={})
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 설정정보 수정 에러', msg_content='방 설정정보 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room setting modification failed', # (원본: "방 설정정보 수정 실패")
+ msg_content='You do not have permission to modify the room settings.', # (원본: "방 설정정보 수정 권한이 없습니다.")
+ data={}
+ )
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room setting modification error', # (원본: "방 설정정보 수정 에러")
+ msg_content='An error occurred while modifying the room settings. Please contact the administrator.', # (원본: "방 설정정보 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/update/room/setting/info\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(방 설정 수정하기) 에러', msg_content='(방 설정 수정하기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Modify room settings) Error', # (원본: "(방 설정 수정하기) 에러")
+ msg_content='An error occurred while modifying the room settings.', # (원본: "(방 설정 수정하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -557,12 +820,28 @@ async def update_team_name(request: Request, body: bytes = Depends(get_body), db
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -570,21 +849,47 @@ async def update_team_name(request: Request, body: bytes = Depends(get_body), db
# 방 사회자 권한 확인
select_master_user_seq_by_user_seq_and_room_seq_result = await room_score.select_master_user_seq_by_user_seq_and_room_seq(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if select_master_user_seq_by_user_seq_and_room_seq_result == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
- # 팀명명 수정하기
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant view failed', # (원본: "참가자 조회 실패")
+ msg_content='You do not have permission to view participants.', # (원본: "참가자 조회 권한이 없습니다.")
+ data={}
+ )
+ # 팀명 수정하기
update_team_name_result = await room_score.update_team_name(data=body, db=db)
if update_team_name_result['result'] == 'OK':
# 파이어베이스 팀명 수정하기
firebase_update_team_name_result = await firebase_process.update_team_name(data=body)
if firebase_update_team_name_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='팀명 수정 에러', msg_content='팀명 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Team name modification error', # (원본: "팀명 수정 에러")
+ msg_content='An error occurred while modifying the team name. Please contact the administrator.', # (원본: "팀명 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/update/team/name\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(팀명 수정) 에러', msg_content='(팀명 수정) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Team name modification) Error', # (원본: "(팀명 수정) 에러")
+ msg_content='An error occurred while modifying the team name.', # (원본: "(팀명 수정) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -600,12 +905,28 @@ async def update_user_role(request: Request, body: bytes = Depends(get_body), db
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -613,7 +934,13 @@ async def update_user_role(request: Request, body: bytes = Depends(get_body), db
# 방 사회자 권한 확인
select_master_user_seq_by_user_seq_and_room_seq_result = await room_score.select_master_user_seq_by_user_seq_and_room_seq(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if select_master_user_seq_by_user_seq_and_room_seq_result == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant view failed', # (원본: "참가자 조회 실패")
+ msg_content='You do not have permission to view participants.', # (원본: "참가자 조회 권한이 없습니다.")
+ data={}
+ )
# 참가자 역할&팀 수정하기
update_participant_role_result = await room_score.update_participant_role(data=body, db=db)
if update_participant_role_result['result'] == 'OK':
@@ -621,13 +948,33 @@ async def update_user_role(request: Request, body: bytes = Depends(get_body), db
firebase_update_participant_role_result = await firebase_process.update_participant_role(data=body)
if firebase_update_participant_role_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 정보 수정 에러', msg_content='참가자 정보 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Participant information modification error', # (원본: "참가자 정보 수정 에러")
+ msg_content='An error occurred while modifying participant information. Please contact the administrator.', # (원본: "참가자 정보 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/update/user/role\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(참가자 역할&팀 수정) 에러', msg_content='(참가자 역할&팀 수정) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Modify participant role/team) Error', # (원본: "(참가자 역할&팀 수정) 에러")
+ msg_content='An error occurred while modifying participant role/team.', # (원본: "(참가자 역할&팀 수정) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -643,12 +990,28 @@ async def get_room_list(request: Request, body: bytes = Depends(get_body), db: S
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -659,13 +1022,33 @@ async def get_room_list(request: Request, body: bytes = Depends(get_body), db: S
select_room_list_result = await room_score.select_room_list(search_type=body['search_type'], search_value=body['search_value'], search_page=body['search_page'], db=db)
if select_room_list_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data=select_room_list_result['data'], db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 리스트 가져오기 에러', msg_content='방 리스트 가져오기 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room list retrieval error', # (원본: "방 리스트 가져오기 에러")
+ msg_content='An error occurred while retrieving the room list. Please contact the administrator.', # (원본: "방 리스트 가져오기 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/room/list\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(검색 방 리스트 가져오기) 에러', msg_content='(검색 방 리스트 가져오기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Retrieve room list) Error', # (원본: "(검색 방 리스트 가져오기) 에러")
+ msg_content='An error occurred while retrieving the room list.', # (원본: "(검색 방 리스트 가져오기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -681,12 +1064,28 @@ async def enter_room(request: Request, body: bytes = Depends(get_body), db: Sess
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -695,31 +1094,67 @@ async def enter_room(request: Request, body: bytes = Depends(get_body), db: Sess
# 방번호로 방 상태 체크
check_room_status_by_room_seq_room_status_result = await room_score.check_room_status_by_room_seq_room_status(room_seq=body['room_seq'], room_status='WAIT', db=db)
if check_room_status_by_room_seq_room_status_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content='대기중 상태인 방에만 입장이 가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content='You can only enter rooms that are in the waiting state.', # (원본: "대기중 상태인 방에만 입장이 가능합니다.")
+ data={}
+ )
# 방번호와 방타입이 맞는지 확인
check_room_seq_and_room_type_and_room_pw_result = await room_score.check_room_seq_and_room_type_and_room_pw(room_seq=body['room_seq'], room_type=body['room_type'], db=db)
if check_room_seq_and_room_type_and_room_pw_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content='방번호와 방타입이 맞지 않습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content='The room number and room type do not match.', # (원본: "방번호와 방타입이 맞지 않습니다.")
+ data={}
+ )
else:
open_yn = check_room_seq_and_room_type_and_room_pw_result['data'][1]
room_pw = check_room_seq_and_room_type_and_room_pw_result['data'][2]
# 방 비밀번호 확인
if open_yn == 'N':
if str(room_pw) != str(body['room_pw']):
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content='방 비밀번호가 틀렸습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content='The room password is incorrect.', # (원본: "방 비밀번호가 틀렸습니다.")
+ data={}
+ )
# 방번호, 방종류로 현재 인원수 체크 후 입장 가능여부 확인
check_now_number_of_people_and_can_enter_result = await room_score.check_now_number_of_people_and_can_enter(room_seq=body['room_seq'], db=db)
if check_now_number_of_people_and_can_enter_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content='방 입장 정원이 초과됐습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content='The maximum number of participants for this room has been reached.', # (원본: "방 입장 정원이 초과됐습니다.")
+ data={}
+ )
# 강퇴된 유저인지 확인
check_kick_user_result = await firebase_process.check_kick_user(user_seq=user_seq, room_seq=body['room_seq'])
if check_kick_user_result['result'] == 'OK':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content='강퇴된 유저입니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content='You have been kicked from this room.', # (원본: "강퇴된 유저입니다.")
+ data={}
+ )
# 이미 입장되어 있는 대기중인 방이 있는지 확인
check_already_enter_room_result = await room_score.check_already_enter_room(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if check_already_enter_room_result['result'] == 'OK':
- msg_content = f'이미 입장되어 있는 대기중인 방이 있습니다.\n방제목은 아래와 같습니다.\n{check_already_enter_room_result["room_title"]}'
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content=msg_content, data={})
+ msg_content = f'A waiting room you have already joined is found.\nThe title is as follows.\n{check_already_enter_room_result["room_title"]}' # (원본: "이미 입장되어 있는 대기중인 방이 있습니다.\n방제목은 아래와 같습니다.\n")
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content=msg_content,
+ data={}
+ )
# 이미 입장한 유저인지 확인
check_already_enter_user_result = await room_score.check_already_enter_user(room_seq=body['room_seq'], room_type=body['room_type'], user_seq=user_seq, db=db)
if check_already_enter_user_result['result'] == 'OK':
@@ -732,66 +1167,44 @@ async def enter_room(request: Request, body: bytes = Depends(get_body), db: Sess
# 입장하는 유저 정보 가져오기
enter_user_info_result = await room_score.enter_user_info(user_seq=user_seq, room_type=body['room_type'], db=db)
if enter_user_info_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 실패', msg_content='유저 정보 조회 실패', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry failed', # (원본: "방 입장 실패")
+ msg_content='Failed to retrieve user information.', # (원본: "유저 정보 조회 실패")
+ data={}
+ )
# 파이어베이스 방 입장하기
firebase_enter_room_user_result = await firebase_process.enter_room_user(room_seq=body['room_seq'], user_info=enter_user_info_result['data'])
if firebase_enter_room_user_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='방 입장 에러', msg_content='방 입장중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Room entry error', # (원본: "방 입장 에러")
+ msg_content='An error occurred while entering the room. Please contact the administrator.', # (원본: "방 입장중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/enter/room\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(방 입장하기) 에러', msg_content='(방 입장하기) 처리중 에러가 발생했습니다.', data={})
-
-
-#==================================================================================================
-# 진행중 강제종료 된 유저 진행중 방 입장하기
-#==================================================================================================
-# @router.post("/enter/running/room")
-# async def enter_running_room(request: Request, body: bytes = Depends(get_body), db: Session = Depends(get_db)):
-# try:
-# # 인증서 갱신
-# auth_token = cert_process.renew_cert(request=request)
-# if auth_token['result'] == 'OK':
-# auth_token = auth_token['data']
-# elif auth_token['result'] == 'TOKEN_EXPIRED':
-# raise token_expired_return_process(auth_token['msg'])
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-# # body에서 ID 추출
-# try:
-# body = json.loads(body)
-# except json.JSONDecodeError as e:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
-
-# user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
-# if user_seq_result["result"] == 'OK':
-# user_seq = user_seq_result['data']['user_seq']
-# body['user_seq'] = user_seq
-# # 해당 유저가 참여중인 진행중인 방 조회
-# select_running_room_by_user_seq_result = await room_score.select_running_room_by_user_seq(user_seq=user_seq, db=db)
-# logger.info(f"select_running_room_by_user_seq_result: {select_running_room_by_user_seq_result}")
-# if select_running_room_by_user_seq_result['result'] == 'OK':
-# # 파이어베이스 진행중 강제종료 된 유저인지 나가기한 유저인지 확인
-# firebase_check_force_exit_yn_result = await firebase_process.check_force_exit_yn(user_seq=user_seq, data=select_running_room_by_user_seq_result['data'])
-# logger.info(f"firebase_check_force_exit_yn_result: {firebase_check_force_exit_yn_result}")
-# if firebase_check_force_exit_yn_result['result'] == 'OK':
-# data = {
-# "force_exit_yn": "Y",
-# "room_seq": firebase_check_force_exit_yn_result['room_seq'],
-# "room_type_name": firebase_check_force_exit_yn_result['room_type_name'],
-# "room_title": firebase_check_force_exit_yn_result['room_title']
-# }
-# return await response.ok_res(auth_token=auth_token, data=data, db=db)
-# return await response.ok_res(auth_token=auth_token, data={"force_exit_yn": "N"}, db=db)
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-
-# except Exception as e:
-# logger.error(f"request error. URL: /room/score/enter/running/room\nerror message: {e}")
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(진행중 방 재입장하기) 에러', msg_content='(진행중 방 재입장하기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Enter room) Error', # (원본: "(방 입장하기) 에러")
+ msg_content='An error occurred while entering the room.', # (원본: "(방 입장하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -807,12 +1220,28 @@ async def get_landing_mainpage_info(request: Request, body: bytes = Depends(get_
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -840,59 +1269,35 @@ async def get_landing_mainpage_info(request: Request, body: bytes = Depends(get_
data["survey_yn"] = select_nickname_survey_yn_join_game_yn_by_user_seq_result['survey_yn']
data["join_game_yn"] = select_nickname_survey_yn_join_game_yn_by_user_seq_result['join_game_yn']
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='설문조사 여부 확인 에러', msg_content='설문조사 여부 확인 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Survey check error', # (원본: "설문조사 여부 확인 에러")
+ msg_content='An error occurred while checking survey status.', # (원본: "설문조사 여부 확인 처리중 에러가 발생했습니다.")
+ data={}
+ )
return await response.ok_res(auth_token=auth_token, data=data, db=db)
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/enter/running/room\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(진행중 방 재입장하기) 에러', msg_content='(진행중 방 재입장하기) 처리중 에러가 발생했습니다.', data={})
-
-
-#==================================================================================================
-# 진행중인방 점수 정보 가져오기
-#==================================================================================================
-# @router.post("/running/room/score/info")
-# async def get_running_room_score_info(request: Request, body: bytes = Depends(get_body), db: Session = Depends(get_db)):
-# try:
-# # 인증서 갱신
-# auth_token = cert_process.renew_cert(request=request)
-# if auth_token['result'] == 'OK':
-# auth_token = auth_token['data']
-# elif auth_token['result'] == 'TOKEN_EXPIRED':
-# raise token_expired_return_process(auth_token['msg'])
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-# # body에서 ID 추출
-# try:
-# body = json.loads(body)
-# except json.JSONDecodeError as e:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
-
-# user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
-# if user_seq_result["result"] == 'OK':
-# user_seq = user_seq_result['data']['user_seq']
-# # 방 참여자 조회 권한 확인
-# check_auth_user_result = await room_score.check_auth_user(user_seq=user_seq, room_type=body['room_type'], room_seq=body['room_seq'], db=db)
-# if check_auth_user_result == 'FAIL':
-# return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='참가자 조회 실패', msg_content='참가자 조회 권한이 없습니다.', data={})
-# # 방 상태가 진행중 인지 확인
-# check_room_status_by_room_seq_room_status_result = await room_score.check_room_status_by_room_seq_room_status(room_seq=body['room_seq'], room_status='RUNNING', db=db)
-# if check_room_status_by_room_seq_room_status_result['result'] == 'FAIL':
-# return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='점수 조회 실패', msg_content='점수 정보 조회는 진행중 상태만 조회가 가능합니다.', data={})
-# # 점수 정보 가져오기
-# participant_user_list_result = await room_score.participant_user_list(user_seq=user_seq, room_type=body['room_type'], room_seq=body['room_seq'], db=db)
-# if participant_user_list_result['result'] == 'OK':
-# return await response.ok_res(auth_token=auth_token, data=participant_user_list_result['data'], db=db)
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='점수 정보 조회 에러', msg_content='점수 정보 조회중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
-# else:
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
-
-# except Exception as e:
-# logger.error(f"request error. URL: /room/score/running/room/score/info\nerror message: {e}")
-# return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(진행중인방 점수 정보 가져오기) 에러', msg_content='(진행중인방 점수 정보 가져오기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Re-enter in-progress room) Error', # (원본: "(진행중 방 재입장하기) 에러")
+ msg_content='An error occurred while re-entering the in-progress room.', # (원본: "(진행중 방 재입장하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -908,12 +1313,28 @@ async def update_running_room_score(request: Request, body: bytes = Depends(get_
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -921,11 +1342,23 @@ async def update_running_room_score(request: Request, body: bytes = Depends(get_
# 방 사회자 권한 확인
select_mc_user_seq_by_room_seq_result = await room_score.select_mc_user_seq_by_room_seq(user_seq=user_seq, room_seq=body['room_seq'], db=db)
if select_mc_user_seq_by_room_seq_result == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='점수 수정 실패', msg_content='점수 수정 권한이 없습니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Score modification failed', # (원본: "점수 수정 실패")
+ msg_content='You do not have permission to modify the score.', # (원본: "점수 수정 권한이 없습니다.")
+ data={}
+ )
# 방 상태가 진행중 인지 확인
check_room_status_by_room_seq_room_status_result = await room_score.check_room_status_by_room_seq_room_status(room_seq=body['room_seq'], room_status='RUNNING', db=db)
if check_room_status_by_room_seq_room_status_result['result'] == 'FAIL':
- return await response.fail_res(auth_token=auth_token, auth_type='NOMAL', msg_title='점수 조회 실패', msg_content='점수 정보 조회는 진행중 상태만 조회가 가능합니다.', data={})
+ return await response.fail_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Score retrieval failed', # (원본: "점수 조회 실패")
+ msg_content='Score information can only be retrieved in progress.', # (원본: "점수 정보 조회는 진행중 상태만 조회가 가능합니다.")
+ data={}
+ )
# 점수 수정하기
update_user_score_result = await room_score.update_user_score(target_user_seq=body['target_user_seq'], after_score=body['after_score'], room_seq=body['room_seq'], db=db)
if update_user_score_result['result'] == 'OK':
@@ -933,13 +1366,33 @@ async def update_running_room_score(request: Request, body: bytes = Depends(get_
update_firebase_score_result = await firebase_process.update_firebase_score(room_seq=body['room_seq'], user_seq=body['target_user_seq'], newScore=body['after_score'])
if update_firebase_score_result['result'] == 'OK':
return await response.ok_res(auth_token=auth_token, data={}, db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='점수 수정 에러', msg_content='점수 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Score modification error', # (원본: "점수 수정 에러")
+ msg_content='An error occurred while modifying the score. Please contact the administrator.', # (원본: "점수 수정중 에러가 발생했습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/update/score\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(점수 수정하기) 에러', msg_content='(점수 수정하기) 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Modify score) Error', # (원본: "(점수 수정하기) 에러")
+ msg_content='An error occurred while modifying the score.', # (원본: "(점수 수정하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -955,12 +1408,28 @@ async def get_finish_room_info(request: Request, body: bytes = Depends(get_body)
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # (원본: "데이터 에러", "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Data Error', # (원본: "데이터 에러")
+ msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', # (원본: "데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.")
+ data={}
+ )
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -973,18 +1442,33 @@ async def get_finish_room_info(request: Request, body: bytes = Depends(get_body)
"user_info": select_finish_room_info_result['user_info']
}
return await response.ok_res(auth_token=auth_token, data=data, db=db)
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='종료된 방 정보 가져오기 에러', msg_content='종료된 방 정보 가져오기 처리중 에러가 발생했습니다.', data={})
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='Finished room info retrieval error', # (원본: "종료된 방 정보 가져오기 에러")
+ msg_content='An error occurred while retrieving information of the finished room.', # (원본: "종료된 방 정보 가져오기 처리중 에러가 발생했습니다.")
+ data={}
+ )
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ # (원본: "사용자 인증 에러", "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='User Authentication Error', # (원본: "사용자 인증 에러")
+ msg_content='User authentication information is incorrect. Please contact the administrator.', # (원본: "사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.")
+ data={}
+ )
except Exception as e:
logger.error(f"request error. URL: /room/score/update/score\nerror message: {e}")
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='(점수 수정하기) 에러', msg_content='(점수 수정하기) 처리중 에러가 발생했습니다.', data={})
-
-
-
-
-
+ return await response.error_res(
+ auth_token=auth_token,
+ auth_type='NOMAL',
+ msg_title='(Modify score) Error', # (원본: "(점수 수정하기) 에러")
+ msg_content='An error occurred while modifying the score.', # (원본: "(점수 수정하기) 처리중 에러가 발생했습니다.")
+ data={}
+ )
#==================================================================================================
@@ -1006,5 +1490,3 @@ def setting_etc_data(data):
data['end_dt'] = 'null'
data['delete_dt'] = 'null'
return data
-
-
diff --git a/fastapi/app/router/survey_api.py b/fastapi/app/router/survey_api.py
index ea25bfa..dc69ff0 100644
--- a/fastapi/app/router/survey_api.py
+++ b/fastapi/app/router/survey_api.py
@@ -51,12 +51,14 @@ async def collect_survey(request: Request, body: bytes = Depends(get_body), db:
elif auth_token['result'] == 'TOKEN_EXPIRED':
raise token_expired_return_process(auth_token['msg'])
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
# body에서 ID 추출
try:
body = json.loads(body)
except json.JSONDecodeError as e:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='데이터 에러', msg_content='데이터 처리 장애가 발생했습니다. 요청정보를 정확히 입력했는지 확인해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='Data Error', msg_content='Data processing error occurred. Please check if the requested information is entered correctly.', data={})
user_seq_result = cert_process.get_user_seq_by_token(token=auth_token['token'])
if user_seq_result["result"] == 'OK':
@@ -80,7 +82,8 @@ async def collect_survey(request: Request, body: bytes = Depends(get_body), db:
else:
return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='설문조사 저장 실패', msg_content='설문조사 저장 처리중 에러가 발생했습니다.', data={})
else:
- return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='토큰 에러', msg_content='토큰 정보가 정확하지 않습니다.', data={})
+ # return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='사용자 인증 에러', msg_content='사용자 인증 정보가 정확하지 않습니다. 관리자에게 문의해주세요.', data={})
+ return await response.error_res(auth_token=auth_token, auth_type='NOMAL', msg_title='User Authentication Error', msg_content='User authentication information is incorrect. Please contact the administrator.', data={})
except Exception as e:
logger.error(f"request error. URL: /room/score/create/room\nerror message: {e}")