Skip to content

Commit 952ba70

Browse files
surajitsurajit
authored andcommitted
update routes for charge
1 parent 5ecf9b1 commit 952ba70

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

routes/v1/charge.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import datetime
2-
31
from fastapi import APIRouter
42
from fastapi import Depends
53
from fastapi import HTTPException
64
from fastapi import Request
5+
from fastapi import status
76
from sqlalchemy.orm import Session
87

98
from crud.charge import ChargeExistException
@@ -20,7 +19,7 @@
2019
)
2120

2221

23-
@router.post("/charges/")
22+
@router.post("/charges/", status_code=status.HTTP_201_CREATED)
2423
@save_log
2524
async def create_charge(request: Request, charge: CreateCharge, db: Session = Depends(get_db)):
2625
try:

0 commit comments

Comments
 (0)