We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from typing import Any, List from fastapi import APIRouter, Depends, HTTPException from sqlalchemy.orm import Session from app import crud, models, schemas from app.api import deps router = APIRouter() @router.post("/", response_model=schemas.Item) def create_item( *, db: Session = Depends(deps.get_db), item_in: schemas.ItemCreate, current_user: models.User = Depends(deps.get_current_active_user), ) -> Any: """ Create new item. """ item = crud.item.create_with_owner(db=db, obj_in=item_in, owner_id=current_user.id) return item
Hi all, why in this and similiar examples crud.item(or user) not injected as dependency?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi all, why in this and similiar examples crud.item(or user) not injected as dependency?
The text was updated successfully, but these errors were encountered: