mirror of
https://github.com/flarum/core.git
synced 2025-07-25 18:51:40 +02:00
Allow support for passing extra signup data to API
This commit is contained in:
@@ -173,11 +173,7 @@ export default class SignUpModal extends Modal {
|
|||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
const data = {
|
const data = this.submitData();
|
||||||
username: this.username(),
|
|
||||||
email: this.email(),
|
|
||||||
password: this.password()
|
|
||||||
};
|
|
||||||
|
|
||||||
app.store.createRecord('users').save(data).then(
|
app.store.createRecord('users').save(data).then(
|
||||||
user => {
|
user => {
|
||||||
@@ -191,4 +187,12 @@ export default class SignUpModal extends Modal {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
submitData() {
|
||||||
|
return {
|
||||||
|
username: this.username(),
|
||||||
|
email: this.email(),
|
||||||
|
password: this.password()
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user