add: createunits
This commit is contained in:
1 parent
7c4ab54f45
commit
70c3a61103
1 file changed
+7
@@ -68,4 +68,11 @@ $app->post("/createingredients", function (array $req, Response $res) use ($db)
|
|||||||
$res->send("New ingredient has been listed ");
|
$res->send("New ingredient has been listed ");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$app->post("/createunits", function (array $req, Response $res) use ($db) {
|
||||||
|
$newUnit = $req["body"]["unit"];
|
||||||
|
$db->insert("folla", ["unita" => "$newUnit"]);
|
||||||
|
|
||||||
|
$res->send("New unit has been listed ");
|
||||||
|
});
|
||||||
|
|
||||||
$app->start();
|
$app->start();
|
||||||
Reference in new issue
Block a user