mobile: Use new account API

This commit is contained in:
Elias Projahn 2020-05-13 16:52:39 +02:00
parent 8d1c2d3a23
commit 80259a8144
5 changed files with 425 additions and 71 deletions

View file

@ -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,
));