Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
iazzenma committed Aug 17, 2024
1 parent 441cfdb commit 65d141c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/birdxplorer_api/routers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
TopicId,
TwitterTimestamp,
UserEnrollment,
PagenationMeta
PaginationMeta
)
from birdxplorer_common.storage import Storage

Expand Down Expand Up @@ -97,8 +97,8 @@ def get_posts(
note_id: Union[List[NoteId], None] = Query(default=None),
created_at_start: Union[None, TwitterTimestamp, str] = Query(default=None),
created_at_end: Union[None, TwitterTimestamp, str] = Query(default=None),
offset: int = Query(default=0, ge=0), # 確保 offset 是非負的
limit: int = Query(default=100, gt=0, le=1000) # 確保 limit 在合理範圍內
offset: int = Query(default=0, ge=0),
limit: int = Query(default=100, gt=0, le=1000)
) -> PostListResponse:
posts = None

Expand Down Expand Up @@ -135,7 +135,7 @@ def get_posts(

return PostListResponse(
data=paginated_posts,
meta=PagenationMeta(
meta=PaginationMeta(
next=next_url,
prev=prev_url
)
Expand Down
2 changes: 1 addition & 1 deletion common/birdxplorer_common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,6 @@ class Post(BaseModel):
repost_count: NonNegativeInt
impression_count: NonNegativeInt

class PagenationMeta(BaseModel):
class PaginationMeta(BaseModel):
next: Optional[HttpUrl] = None
prev: Optional[HttpUrl] = None

0 comments on commit 65d141c

Please sign in to comment.