This commit is contained in:
@@ -62,6 +62,23 @@ namespace Aberwyn.Controllers
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("today")]
|
||||
public IActionResult GetTodayMenu()
|
||||
{
|
||||
var today = DateTime.Today;
|
||||
var menu = _menuService.GetMenuForDate(today);
|
||||
|
||||
if (menu == null)
|
||||
return NotFound(new { message = "Ingen meny hittades för idag." });
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
date = today.ToString("yyyy-MM-dd"),
|
||||
lunch = menu.LunchMealName ?? "",
|
||||
dinner = menu.DinnerMealName ?? "",
|
||||
breakfast = menu.BreakfastMealName ?? ""
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
[HttpPut("menu")]
|
||||
|
||||
Reference in New Issue
Block a user