Skip to content

Commit

Permalink
fix: HttpUrl type specified
Browse files Browse the repository at this point in the history
  • Loading branch information
iazzenma authored and osoken committed Aug 18, 2024
1 parent a34b969 commit 2763c48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/birdxplorer_api/routers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from dateutil.parser import parse as dateutil_parse
from fastapi import APIRouter, HTTPException, Query, Request
from pydantic import HttpUrl

from birdxplorer_common.models import (
BaseModel,
Expand Down Expand Up @@ -127,7 +128,7 @@ def get_posts(
total_count = len(posts)
paginated_posts = posts[offset : offset + limit]
for post in paginated_posts:
post.link = f"https://x.com/{post.x_user.name}/status/{post.post_id}"
post.link = HttpUrl(f"https://x.com/{post.x_user.name}/status/{post.post_id}")

base_url = str(request.url).split("?")[0]
next_offset = offset + limit
Expand Down

0 comments on commit 2763c48

Please sign in to comment.