remove trailing slashes

This commit is contained in:
Piotr Domański 2023-04-01 20:23:04 +02:00
parent 99dc9f95ef
commit e1359eb6eb
7 changed files with 10 additions and 10 deletions

View file

@ -14,7 +14,7 @@ from .db import get_session
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="api/token/") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="api/token")
settings = Settings() settings = Settings()
password_helper = PasswordHelper(pwd_context) password_helper = PasswordHelper(pwd_context)

View file

@ -7,7 +7,7 @@ from datetime import date
router = APIRouter(tags=["diary"]) router = APIRouter(tags=["diary"])
@router.get("/", response_model=Diary) @router.get("", response_model=Diary)
async def get_diary( async def get_diary(
request: Request, request: Request,
date: date, date: date,

View file

@ -6,7 +6,7 @@ from ..controller.entry import CreateEntry, UpdateEntry, DeleteEntry
router = APIRouter(tags=["entry"]) router = APIRouter(tags=["entry"])
@router.post("/", response_model=Entry) @router.post("", response_model=Entry)
async def create_entry( async def create_entry(
request: Request, request: Request,
data: CreateEntryPayload, data: CreateEntryPayload,
@ -15,7 +15,7 @@ async def create_entry(
return await contoller.call(data) return await contoller.call(data)
@router.put("/{entry_id}", response_model=Entry) @router.put("{entry_id}", response_model=Entry)
async def update_entry( async def update_entry(
request: Request, request: Request,
entry_id: int, entry_id: int,
@ -25,7 +25,7 @@ async def update_entry(
return await contoller.call(entry_id, data) return await contoller.call(entry_id, data)
@router.delete("/{entry_id}") @router.delete("{entry_id}")
async def delete_entry( async def delete_entry(
request: Request, request: Request,
entry_id: int, entry_id: int,

View file

@ -6,7 +6,7 @@ from ..controller.meal import CreateMeal
router = APIRouter(tags=["meal"]) router = APIRouter(tags=["meal"])
@router.post("/", response_model=Meal) @router.post("", response_model=Meal)
async def create_meal( async def create_meal(
request: Request, request: Request,
data: CreateMealPayload, data: CreateMealPayload,

View file

@ -7,7 +7,7 @@ from typing import Optional
router = APIRouter(tags=["product"]) router = APIRouter(tags=["product"])
@router.get("/", response_model=ListProductPayload) @router.get("", response_model=ListProductPayload)
async def list_product( async def list_product(
request: Request, request: Request,
controller: ListProduct = Depends(ListProduct), controller: ListProduct = Depends(ListProduct),
@ -20,7 +20,7 @@ async def list_product(
) )
@router.post("/", response_model=Product) @router.post("", response_model=Product)
async def create_product( async def create_product(
request: Request, request: Request,
data: CreateProductPayload, data: CreateProductPayload,

View file

@ -8,7 +8,7 @@ from typing import Annotated
router = APIRouter(tags=["token"]) router = APIRouter(tags=["token"])
@router.post("/", response_model=Token) @router.post("", response_model=Token)
async def create_token( async def create_token(
request: Request, request: Request,
data: Annotated[OAuth2PasswordRequestForm, Depends()], data: Annotated[OAuth2PasswordRequestForm, Depends()],

View file

@ -6,7 +6,7 @@ from ..controller.user import CreateUser
router = APIRouter(tags=["user"]) router = APIRouter(tags=["user"])
@router.post("/", response_model=User) @router.post("", response_model=User)
async def create_user( async def create_user(
request: Request, request: Request,
data: CreateUserPayload, data: CreateUserPayload,