fix management component

This commit is contained in:
2023-05-05 08:37:07 +02:00
parent a5ad7ce97d
commit 3a87d41068
2 changed files with 4 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ export class ManagementComponent implements OnInit {
showLocationForm: boolean = false;
showWaypointForm: boolean = false;
newUser: UserEntity = {name: "", password: "", username: ""};
newUser: UserEntity = { password: "", username: ""};
newLocation: LocationEntity = {location: "", lat: 0, lon: 0, region: ""};
newWaypoint: WaypointsEntity = {description: "", img: "", lat: 0, locationName: "", lon: 0, name: ""};
@@ -59,8 +59,8 @@ export class ManagementComponent implements OnInit {
});
}
addUser(name: string, username: string, password: string) {
this.newUser = {name: name, username: username, password: password};
addUser( username: string, password: string) {
this.newUser = { username: username, password: password};
this.userService.createUser(this.newUser).subscribe(user => {
this.users?.push(user);
});