Fix: Product add was not working as the endpoint was configured wrongly
This commit is contained in:
parent
005d45032f
commit
80a8de5fea
brewman/routers
@ -84,7 +84,7 @@ def update(
|
||||
raise
|
||||
|
||||
|
||||
@router.delete("/{id}")
|
||||
@router.delete("/{id_}")
|
||||
def delete(
|
||||
id_: uuid.UUID, db: Session = Depends(get_db), user: UserToken = Security(get_user, scopes=["accounts"]),
|
||||
):
|
||||
|
@ -25,7 +25,7 @@ def get_db():
|
||||
db.close()
|
||||
|
||||
|
||||
@router.post("/", response_model=schemas.Product)
|
||||
@router.post("", response_model=schemas.Product)
|
||||
def save(
|
||||
data: schemas.ProductIn, db: Session = Depends(get_db), user: UserToken = Security(get_user, scopes=["products"]),
|
||||
):
|
||||
@ -111,7 +111,7 @@ def delete(
|
||||
)
|
||||
|
||||
|
||||
@router.get("/")
|
||||
@router.get("")
|
||||
def show_blank(
|
||||
db: Session = Depends(get_db), user: UserToken = Security(get_user, scopes=["products"]),
|
||||
):
|
||||
|
Loading…
x
Reference in New Issue
Block a user