Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuban10703 authored Jul 18, 2023
1 parent d817117 commit cfc83f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def setu_get(
replace_url: Optional[HttpUrl] = None,
):
filtered_tags = {tag.strip() for tag in tags if tag.strip()}
setus = await get_setu_data(r18, num, filtered_tags, str(replace_url))
setus = await get_setu_data(r18, num, filtered_tags, replace_url)
if not setus:
raise HTTPException(status_code=404, detail="色图库中没找到色图~")
return {
Expand All @@ -42,7 +42,7 @@ async def setu_get(

@app.post("/setu", response_class=ORJSONResponse)
async def setu_post(item: Item):
setus = await get_setu_data(item.r18, item.num, item.tags, str(item.replace_url))
setus = await get_setu_data(item.r18, item.num, item.tags, item.replace_url)
if not setus:
raise HTTPException(status_code=404, detail="色图库中没找到色图~")
return {
Expand All @@ -56,4 +56,4 @@ async def setu_post(item: Item):
if __name__ == "__main__":
import uvicorn

uvicorn.run("main:app", host="0.0.0.0", port=9999, reload=True)
uvicorn.run("main:app", host="0.0.0.0", port=9999, reload=True)
4 changes: 2 additions & 2 deletions app/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ def remove_empty_tags(cls, tags):
class Setu_out(BaseModel):
detail: str = ''
count: int
tags: List[str]
data: List[Setu]
tags: Set[str]
data: List[Setu]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ motor
orjson
uvicorn
dnspython
pydantic
pydantic<2.0

0 comments on commit cfc83f4

Please sign in to comment.