Untitled
unknown
csharp
7 months ago
348 B
5
Indexable
[Authorize]
[HttpPost("find")]
public ActionResult<MenuOption> GetCart([FromBody] int id)
{
if(User.FindFirst(ClaimTypes.Name) == null) return BadRequest("Claim is not found");
MenuOption? foundOption = FindMenu(id);
if(foundOption == null) {
return BadRequest("No menu found");
}
return Ok(foundOption);
}Editor is loading...
Leave a Comment