From 12da68840fbc61c7b9ee9c52d74913a010bb45fb Mon Sep 17 00:00:00 2001 From: "raoha.rh" Date: Tue, 20 Aug 2024 20:16:07 +0800 Subject: [PATCH] fix: update token --- server/routers/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routers/bot.py b/server/routers/bot.py index 368f663e..755ecb58 100644 --- a/server/routers/bot.py +++ b/server/routers/bot.py @@ -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 @@ -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")