LA
Size: a a a
LA
LA
LA
LA
LA
itemsLA
LA
LA
LA
app.post('/api/menus', async (req, res, next) => {
const items = req.body.Items;
try {
const result = items.map(async (item) => {
await db.Menu.create({
id: item.id,
menu_name: item.menu_name,
restaurantID: item.restaurantID,
menu_detail: item.menu_detail,
});
})
return res.status(200).json(result);
} catch {
return res.status(401).send({ message: "failed to create menu" });
}
});YZ
app.post('/api/menus', async (req, res, next) => {
const items = req.body.Items;
try {
const result = items.map(async (item) => {
await db.Menu.create({
id: item.id,
menu_name: item.menu_name,
restaurantID: item.restaurantID,
menu_detail: item.menu_detail,
});
})
return res.status(200).json(result);
} catch {
return res.status(401).send({ message: "failed to create menu" });
}
});LA
BD
LA
LA
BD
A
YZ