Skip to content

Commit a06b797

Browse files
committed
fixed updateUserProfile (backend error)
1 parent 10b3cb5 commit a06b797

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

backend/gamelink/src/main/java/urjc/gamelink/Controllers/UserRestController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.springframework.web.bind.annotation.PathVariable;
2323
import org.springframework.web.bind.annotation.PostMapping;
2424
import org.springframework.web.bind.annotation.PutMapping;
25+
import org.springframework.web.bind.annotation.RequestBody;
2526
import org.springframework.web.bind.annotation.RequestMapping;
2627
import org.springframework.web.bind.annotation.RequestParam;
2728
import org.springframework.web.bind.annotation.ResponseStatus;
@@ -86,7 +87,7 @@ public ResponseEntity<Usero> createUser(Usero user, @RequestParam String passwor
8687

8788
// Modifies a user
8889
@PutMapping("/{id}")
89-
public ResponseEntity<Usero> updateUser(@PathVariable long id, @RequestParam Usero updatedUser)
90+
public ResponseEntity<Usero> updateUser(@PathVariable long id, @RequestBody Usero updatedUser)
9091
throws SQLException {
9192

9293
if (us.exist(id)) {

backend/gamelink/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spring.mustache.suffix=.html
1010

1111
spring.datasource.url=jdbc:postgresql://localhost:5432/gamelink
1212
spring.datasource.username=postgres
13-
spring.datasource.password=Nekowa10
13+
spring.datasource.password=password
1414
spring.jpa.hibernate.ddl-auto=create-drop
1515

1616
logging.level.org.springframework.security=DEBUG

backend/gamelink/target/classes/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spring.mustache.suffix=.html
1010

1111
spring.datasource.url=jdbc:postgresql://localhost:5432/gamelink
1212
spring.datasource.username=postgres
13-
spring.datasource.password=Nekowa10
13+
spring.datasource.password=password
1414
spring.jpa.hibernate.ddl-auto=create-drop
1515

1616
logging.level.org.springframework.security=DEBUG

frontend/src/app/app.routing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ const appRoutes = [
2323
{ path: 'about', component: AboutComponent },
2424
{ path: 'login', component: LoginComponent },
2525
{ path: 'signUp', component: SignUpComponent },
26-
{ path: '', redirectTo: 'home', pathMatch: 'full' }
26+
{ path: '', redirectTo: 'home', pathMatch: 'full' },
27+
{ path: '**', redirectTo: 'home' }
2728

2829
]
2930

0 commit comments

Comments
 (0)