add: createunits
This commit is contained in:
parent
7c4ab54f45
commit
70c3a61103
@ -68,4 +68,11 @@ $app->post("/createingredients", function (array $req, Response $res) use ($db)
|
||||
$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();
|
Loading…
Reference in New Issue
Block a user