I need to update specific data in an existing record within the database using a POST method. Currently, every time I make a POST request, it creates a new record instead of updating the existing one. What is the most straightforward approach to achieve this?
My frontend is built with Angular and I am using Glassfish RESTful server as my backend.
Here is the TypeScript file:
[typescript code here]
I am attempting to post data to the latest/newest added record at the following link:
'http://localhost:8080/aquadine-jee/resources/restaurant'
Backend code snippet:
[Java code snippets here]