mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
mobile: Use new account API
This commit is contained in:
parent
8d1c2d3a23
commit
80259a8144
5 changed files with 425 additions and 71 deletions
|
|
@ -34,11 +34,11 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
_loading = true;
|
||||
});
|
||||
|
||||
final success = await backend.client.register(User(
|
||||
name: nameController.text,
|
||||
final success = await backend.client.registerAccount(
|
||||
username: nameController.text,
|
||||
email: emailController.text,
|
||||
password: passwordController.text,
|
||||
));
|
||||
);
|
||||
|
||||
setState(() {
|
||||
_loading = false;
|
||||
|
|
@ -46,9 +46,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
|
||||
if (success) {
|
||||
await backend.settings
|
||||
.setAccount(MusicusAccountSettings(
|
||||
.setAccount(MusicusAccountCredentials(
|
||||
username: nameController.text,
|
||||
email: emailController.text,
|
||||
password: passwordController.text,
|
||||
));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue