Spaces:
Sleeping
Sleeping
Update routers/produccion.py
Browse files- routers/produccion.py +4 -4
routers/produccion.py
CHANGED
@@ -30,7 +30,7 @@ def get_produccion():
|
|
30 |
return []
|
31 |
|
32 |
|
33 |
-
|
34 |
def post_produccion(produccion: Produccion):
|
35 |
try:
|
36 |
with DatabaseConnection().get_connection() as conn:
|
@@ -50,7 +50,7 @@ def post_produccion(produccion: Produccion):
|
|
50 |
return []
|
51 |
|
52 |
|
53 |
-
|
54 |
def put_produccion(produccion: Produccion):
|
55 |
try:
|
56 |
with DatabaseConnection().get_connection() as conn:
|
@@ -71,7 +71,7 @@ def put_produccion(produccion: Produccion):
|
|
71 |
return []
|
72 |
|
73 |
|
74 |
-
|
75 |
def delete_produccion(ID_Produccion: int):
|
76 |
try:
|
77 |
with DatabaseConnection().get_connection() as conn:
|
@@ -87,7 +87,7 @@ def delete_produccion(ID_Produccion: int):
|
|
87 |
return []
|
88 |
|
89 |
|
90 |
-
|
91 |
def get_produccion_maquina(ID_Maquina: int):
|
92 |
try:
|
93 |
with DatabaseConnection().get_connection() as conn:
|
|
|
30 |
return []
|
31 |
|
32 |
|
33 |
+
@router.post("/")
|
34 |
def post_produccion(produccion: Produccion):
|
35 |
try:
|
36 |
with DatabaseConnection().get_connection() as conn:
|
|
|
50 |
return []
|
51 |
|
52 |
|
53 |
+
@router.put("/")
|
54 |
def put_produccion(produccion: Produccion):
|
55 |
try:
|
56 |
with DatabaseConnection().get_connection() as conn:
|
|
|
71 |
return []
|
72 |
|
73 |
|
74 |
+
@router.delete("/")
|
75 |
def delete_produccion(ID_Produccion: int):
|
76 |
try:
|
77 |
with DatabaseConnection().get_connection() as conn:
|
|
|
87 |
return []
|
88 |
|
89 |
|
90 |
+
@router.get("/maquina/{ID_Maquina}")
|
91 |
def get_produccion_maquina(ID_Maquina: int):
|
92 |
try:
|
93 |
with DatabaseConnection().get_connection() as conn:
|