国服特色数据修正
This commit is contained in:
@@ -12,6 +12,7 @@ from core.open.helper import get_user_info_by_id, get_user_info_by_role_id, get_
|
||||
from core.open.skillTree import get_skill_tree_info
|
||||
from api.core.exception import ResponseException
|
||||
from api.utils.skill_detail import SKILL_DETAIL_NORMALIZE_VERSION, normalize_skill_detail, skill_detail_for_level
|
||||
from api.utils.openapi_data import openapi_locale_path
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -80,7 +81,7 @@ async def get_skill_info(state: AltersDep, skillId: str, level: int, redis: Redi
|
||||
def get_skill_info():
|
||||
# This function should retrieve the skill info based on job and jobGrow
|
||||
# For now, we return a placeholder dictionary
|
||||
with open(f'./openapi/data/{jobId}/{jobGrowId}/cn/skillDetail/{skillId}.json', encoding='utf-8') as f:
|
||||
with open(openapi_locale_path('cn', jobId, jobGrowId, 'skillDetail', f'{skillId}.json'), encoding='utf-8') as f:
|
||||
skill_data = json.load(f)
|
||||
return normalize_skill_detail(skill_data)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ from api.core.Response import response
|
||||
from api.core.Redis import get_redis_info
|
||||
from api.dp import RedisDep
|
||||
from api.utils.skill_detail import SKILL_DETAIL_NORMALIZE_VERSION, normalize_skill_detail, skill_detail_for_level
|
||||
from api.utils.openapi_data import openapi_locale_path
|
||||
from api.utils.skill_tree import (
|
||||
SKILL_TREE_WITH_DESC_SPECIAL_VERSION,
|
||||
filter_skill_tree_by_desc_special,
|
||||
@@ -145,7 +146,7 @@ async def get_cn_skill_info(
|
||||
# This function should retrieve the skill info based on job and jobGrow
|
||||
# For now, we return a placeholder dictionary
|
||||
with open(
|
||||
f'./openapi/data/{jobId}/{jobGrowId}/cn/skillDetail/{skillId}.json',
|
||||
openapi_locale_path('cn', jobId, jobGrowId, 'skillDetail', f'{skillId}.json'),
|
||||
encoding='utf-8',
|
||||
) as f:
|
||||
skill_data = json.load(f)
|
||||
|
||||
Reference in New Issue
Block a user