Skip to content

Commit bac6269

Browse files
committed
Fix login and mission planner
1 parent 23a5e42 commit bac6269

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/api/User.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class UserApi {
2323
}
2424

2525
login(email, password) {
26-
const url = `${this.basePath}/api/v1/users/auth`;
26+
const url = `${this.basePath}/api/v1/login`;
2727

2828
return reqwest({ url: url, method: 'post', type: 'json',
2929
contentType: 'application/json',
@@ -34,19 +34,21 @@ class UserApi {
3434
}
3535

3636
register(name, email, password) {
37-
const url = `${this.basePath}/api/v1/users`;
37+
const url = `${this.basePath}/api/v1/register`;
3838

3939
return reqwest({ url: url, method: 'post', type: 'json',
4040
contentType: 'application/json',
4141
data: JSON.stringify({
42-
name: name,
42+
firstName: name,
43+
lastName: name,
4344
email: email,
45+
phone: "1",
4446
password: password,
4547
})});
4648
}
4749

4850
registerSocialUser(name, email) {
49-
const url = `${this.basePath}/api/v1/users/social`;
51+
const url = `${this.basePath}/api/v1/login/social`;
5052

5153
return reqwest({ url: url, method: 'post', type: 'json',
5254
contentType: 'application/json',

0 commit comments

Comments
 (0)