diff --git a/external/front/src/components/auth/login.component.js b/external/front/src/components/auth/login.component.js index 5a765f24..5a1d6f2c 100644 --- a/external/front/src/components/auth/login.component.js +++ b/external/front/src/components/auth/login.component.js @@ -81,12 +81,12 @@ export default class Login extends Component { render() { return ( -
+
profile-img
-
+
-
+
-
+
)} {this.state.message && ( -
+
{ - if (response.data.length > 100) { localStorage.setItem("username", username); localStorage.setItem("user_token", response.data); @@ -28,11 +27,10 @@ class AuthService { localStorage.removeItem("user_token"); } - register(username, password, street, number) { - return axios.post(API_URL + "users", { - username: username, - password: password, - status: "created", + register(name, surname, username, password) { + return axios.post(API_URL + "customer", { + name: name, + surname: surname, address: { street: "Green Dolphin Street", street_no: "42" @@ -43,11 +41,6 @@ class AuthService { 'Content-Type': 'application/json' } }).then(response => { - if (response.data.uuid) { - localStorage.setItem("user_uuid", response.data.uuid); - localStorage.setItem("username", response.data.username); - } - return this.createLogin(username, password); }); }