remove trailing slashes
This commit is contained in:
parent
99dc9f95ef
commit
e1359eb6eb
7 changed files with 10 additions and 10 deletions
|
@ -14,7 +14,7 @@ from .db import get_session
|
|||
|
||||
|
||||
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
||||
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="api/token/")
|
||||
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="api/token")
|
||||
settings = Settings()
|
||||
password_helper = PasswordHelper(pwd_context)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ from datetime import date
|
|||
router = APIRouter(tags=["diary"])
|
||||
|
||||
|
||||
@router.get("/", response_model=Diary)
|
||||
@router.get("", response_model=Diary)
|
||||
async def get_diary(
|
||||
request: Request,
|
||||
date: date,
|
||||
|
|
|
@ -6,7 +6,7 @@ from ..controller.entry import CreateEntry, UpdateEntry, DeleteEntry
|
|||
router = APIRouter(tags=["entry"])
|
||||
|
||||
|
||||
@router.post("/", response_model=Entry)
|
||||
@router.post("", response_model=Entry)
|
||||
async def create_entry(
|
||||
request: Request,
|
||||
data: CreateEntryPayload,
|
||||
|
@ -15,7 +15,7 @@ async def create_entry(
|
|||
return await contoller.call(data)
|
||||
|
||||
|
||||
@router.put("/{entry_id}", response_model=Entry)
|
||||
@router.put("{entry_id}", response_model=Entry)
|
||||
async def update_entry(
|
||||
request: Request,
|
||||
entry_id: int,
|
||||
|
@ -25,7 +25,7 @@ async def update_entry(
|
|||
return await contoller.call(entry_id, data)
|
||||
|
||||
|
||||
@router.delete("/{entry_id}")
|
||||
@router.delete("{entry_id}")
|
||||
async def delete_entry(
|
||||
request: Request,
|
||||
entry_id: int,
|
||||
|
|
|
@ -6,7 +6,7 @@ from ..controller.meal import CreateMeal
|
|||
router = APIRouter(tags=["meal"])
|
||||
|
||||
|
||||
@router.post("/", response_model=Meal)
|
||||
@router.post("", response_model=Meal)
|
||||
async def create_meal(
|
||||
request: Request,
|
||||
data: CreateMealPayload,
|
||||
|
|
|
@ -7,7 +7,7 @@ from typing import Optional
|
|||
router = APIRouter(tags=["product"])
|
||||
|
||||
|
||||
@router.get("/", response_model=ListProductPayload)
|
||||
@router.get("", response_model=ListProductPayload)
|
||||
async def list_product(
|
||||
request: Request,
|
||||
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(
|
||||
request: Request,
|
||||
data: CreateProductPayload,
|
||||
|
|
|
@ -8,7 +8,7 @@ from typing import Annotated
|
|||
router = APIRouter(tags=["token"])
|
||||
|
||||
|
||||
@router.post("/", response_model=Token)
|
||||
@router.post("", response_model=Token)
|
||||
async def create_token(
|
||||
request: Request,
|
||||
data: Annotated[OAuth2PasswordRequestForm, Depends()],
|
||||
|
|
|
@ -6,7 +6,7 @@ from ..controller.user import CreateUser
|
|||
router = APIRouter(tags=["user"])
|
||||
|
||||
|
||||
@router.post("/", response_model=User)
|
||||
@router.post("", response_model=User)
|
||||
async def create_user(
|
||||
request: Request,
|
||||
data: CreateUserPayload,
|
||||
|
|
Loading…
Reference in a new issue