Created
March 5, 2020 11:19
-
-
Save philmade/987261ae3f91dcd3c76942a851fafd4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI | |
app = FastAPI() | |
@app.get('/') | |
def index(request: Request, db: Session = Depends(get_db), | |
current_user: models.User = Depends(current_user)): | |
users = crud.get_channels(db, skip=0, limit=100) | |
return templates.TemplateResponse('index.html', {"title": 'home', | |
"users": users, | |
"request": request, | |
"current_user": current_user | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment