Skip to content

Commit

Permalink
fix: HttpUrl type specified
Browse files Browse the repository at this point in the history
  • Loading branch information
iazzenma committed Aug 18, 2024
1 parent 6a6a002 commit 223fc0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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 @@ -124,8 +125,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 223fc0b

Please sign in to comment.