添加缓存预热
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from fastapi.params import Param
|
||||
from api.core.Gzip import register_gzip_request
|
||||
import json
|
||||
from fastapi import APIRouter, Path, Query, Depends
|
||||
from fastapi import APIRouter, Path, Query
|
||||
from api.core.Response import response
|
||||
from api.core.Redis import get_redis_info
|
||||
from api.dp import RedisDep
|
||||
@@ -40,7 +39,7 @@ def replace_placeholders(template):
|
||||
@router.get('/skills/', operation_id='skillsList', response_model=SearchSkillResponse)
|
||||
async def get_skills_list(
|
||||
redis: RedisDep,
|
||||
skillName: Annotated[str, Param(..., description='技能名称,支持模糊查询')] = None,
|
||||
skillName: Annotated[str | None, Query(description='技能名称,支持模糊查询')] = None,
|
||||
) -> SearchSkillResponse:
|
||||
"""
|
||||
根据技能名称,获取对应的技能列表信息
|
||||
@@ -129,7 +128,7 @@ async def get_cn_skill_info(
|
||||
jobId: Annotated[str, Path(..., description='职业')],
|
||||
jobGrowId: Annotated[str, Path(..., description='转职')],
|
||||
skillId: Annotated[str, Path(..., description='技能')],
|
||||
level: Annotated[int, Param(..., description='技能等级')] = None,
|
||||
level: Annotated[int | None, Query(description='技能等级')] = None,
|
||||
) -> SkillDetailResponse:
|
||||
"""
|
||||
获取技能详细信息
|
||||
@@ -185,18 +184,16 @@ async def get_cn_skill_info(
|
||||
@router.get('/skillData/summary/', operation_id='skillDataSummary', response_model=SkillDataSummaryResponse)
|
||||
async def get_skill_data_summary(
|
||||
redis: RedisDep,
|
||||
job: Annotated[str, Param(..., description='职业')],
|
||||
job: Annotated[str, Query(description='职业')],
|
||||
skills: Annotated[
|
||||
str,
|
||||
Param(
|
||||
...,
|
||||
Query(
|
||||
description='技能列表字符串,逗号拼接技能名称,不传递或者传递为空时,查询所有',
|
||||
),
|
||||
] = '',
|
||||
weapons: Annotated[
|
||||
str,
|
||||
Param(
|
||||
...,
|
||||
Query(
|
||||
description='武器类型列表字符串,逗号拼接武器类型名称,不传递或者传递为空时,查询所有',
|
||||
),
|
||||
] = '',
|
||||
|
||||
Reference in New Issue
Block a user