Skip to content

Commit

Permalink
Merge branch 'master' into gh-1063
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-ciocanu authored Jun 28, 2024
2 parents fd9758b + 9afbc3c commit 770476e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public void postMessages(@RequestBody String message){
}

@PutMapping(path = "/messages/{messageId}")
public void putMessages(@PathVariable Integer messageId, @RequestBody String message){
public void putMessages(@PathVariable("messageId") Integer messageId, @RequestBody String message){
messagesReceived.put(messageId,message);
}

@DeleteMapping(path = "/messages/{messageId}")
public void deleteMessages(@PathVariable Integer messageId){
public void deleteMessages(@PathVariable("messageId") Integer messageId){
messagesReceived.remove(messageId);
}

Expand All @@ -58,7 +58,7 @@ public void postPerson(@RequestBody Person person){
}

@PutMapping(path = "/persons/{personId}")
public void putPerson(@PathVariable Integer personId, @RequestBody Person person){
public void putPerson(@PathVariable("personId") Integer personId, @RequestBody Person person){
final Optional<Person> auxPerson = persons.stream().filter(person1 -> person1.getId() == personId).findFirst();
if(auxPerson.isPresent()){
auxPerson.get().setName(person.getName());
Expand All @@ -68,7 +68,7 @@ public void putPerson(@PathVariable Integer personId, @RequestBody Person person
}

@DeleteMapping(path = "/persons/{personId}")
public void deletePerson(@PathVariable Integer personId){
public void deletePerson(@PathVariable("personId") Integer personId){
final Optional<Person> auxPerson = persons.stream().filter(person1 -> person1.getId() == personId).findFirst();
if(auxPerson.isPresent()) {
persons.remove(auxPerson.get());
Expand Down

0 comments on commit 770476e

Please sign in to comment.