Skip to content

Commit

Permalink
fix: update token (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwanying authored Aug 20, 2024
2 parents 1cc8437 + 12da688 commit cf2d373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routers/bot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastapi import APIRouter, Cookie, Depends, status, HTTPException, Query, Path
from fastapi import APIRouter, Depends, status, Query, Path
from fastapi.responses import JSONResponse
from auth.get_user_info import get_user_id
from petercat_utils import get_client
Expand All @@ -13,7 +13,7 @@
)

@router.get("/list")
def get_bot_list(personal: Optional[str] = Query(None, description="Filter bots by personal category"), name: Optional[str] = Query(None, description="Filter bots by name"), user_id: str = Cookie(None)):
def get_bot_list(personal: Optional[str] = Query(None, description="Filter bots by personal category"), name: Optional[str] = Query(None, description="Filter bots by name"), user_id: Annotated[str | None, Depends(get_user_id)] = None):
try:
supabase = get_client()
query = supabase.table("bots").select("id, created_at, updated_at, avatar, description, name, public, starters, uid")
Expand Down

0 comments on commit cf2d373

Please sign in to comment.