feat: 实现资源(图片、音频)查询,完善README
This commit is contained in:
@@ -14,8 +14,11 @@ def readMatchList() -> dict:
|
||||
|
||||
return result
|
||||
|
||||
matter_list = readMatterList()
|
||||
match_list = readMatchList()
|
||||
|
||||
def readMatter(id: str):
|
||||
path = readMatterList().get(id, -1)
|
||||
path = matter_list.get(id, -1)
|
||||
if (path == -1):
|
||||
return {"message": f"No Matter {id}"}
|
||||
with open(f"resources/matters/{path}.json", "r", encoding="utf8") as f:
|
||||
@@ -25,7 +28,7 @@ def readMatter(id: str):
|
||||
return {"message": "OK", "content": result}
|
||||
|
||||
def selectMatter(id: str):
|
||||
matter_id = readMatchList().get(id, -1)
|
||||
matter_id = match_list.get(id, -1)
|
||||
if (matter_id == -1):
|
||||
return {"message": f"No Matter {id}"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user