This commit is contained in:
Timothy Jaeryang Baek 2024-12-22 19:47:40 -07:00
parent f1d21fc59a
commit 5e8f3048f9

View File

@ -32,7 +32,10 @@ router = APIRouter()
@router.get("/", response_model=list[ChannelModel])
async def get_channels(user=Depends(get_verified_user)):
if user.role == "admin":
return Channels.get_channels()
else:
return Channels.get_channels_by_user_id(user.id)
############################