Spaces:
Sleeping
Sleeping
Update routers/almacen.py
Browse files- routers/almacen.py +6 -2
routers/almacen.py
CHANGED
@@ -28,9 +28,13 @@ def get_almacen():
|
|
28 |
print(e)
|
29 |
return []
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
@router.post("/")
|
33 |
-
def post_almacen(almacen:
|
34 |
try:
|
35 |
with DatabaseConnection().get_connection() as conn:
|
36 |
cursor = conn.cursor()
|
|
|
28 |
print(e)
|
29 |
return []
|
30 |
|
31 |
+
class AlmacenPOST(BaseModel):
|
32 |
+
ID_Insumo: int
|
33 |
+
Cantidad_Actual: int
|
34 |
+
Cantidad_Minima:int
|
35 |
+
|
36 |
@router.post("/")
|
37 |
+
def post_almacen(almacen: AlmacenPOST):
|
38 |
try:
|
39 |
with DatabaseConnection().get_connection() as conn:
|
40 |
cursor = conn.cursor()
|