Spaces:
Sleeping
Sleeping
Update routers/gastos.py
Browse files- routers/gastos.py +2 -2
routers/gastos.py
CHANGED
@@ -29,7 +29,7 @@ def get_gastos():
|
|
29 |
return []
|
30 |
|
31 |
|
32 |
-
|
33 |
def post_gasto(gasto: Gastos):
|
34 |
try:
|
35 |
with DatabaseConnection().get_connection() as conn:
|
@@ -45,7 +45,7 @@ def post_gasto(gasto: Gastos):
|
|
45 |
return []
|
46 |
|
47 |
|
48 |
-
|
49 |
def put_gasto(gasto: Gastos):
|
50 |
try:
|
51 |
with DatabaseConnection().get_connection() as conn:
|
|
|
29 |
return []
|
30 |
|
31 |
|
32 |
+
@router.post("/")
|
33 |
def post_gasto(gasto: Gastos):
|
34 |
try:
|
35 |
with DatabaseConnection().get_connection() as conn:
|
|
|
45 |
return []
|
46 |
|
47 |
|
48 |
+
@router.put("/")
|
49 |
def put_gasto(gasto: Gastos):
|
50 |
try:
|
51 |
with DatabaseConnection().get_connection() as conn:
|