Enable login (without view yet)
This commit is contained in:
parent
a6300d0388
commit
b54c523491
6 changed files with 27 additions and 1 deletions
|
@ -62,6 +62,13 @@ export class User extends Model implements UserData {
|
|||
super();
|
||||
}
|
||||
|
||||
async login(): Promise<void> {
|
||||
await super.create("token/login", {
|
||||
email: this.email,
|
||||
password: this.password,
|
||||
});
|
||||
}
|
||||
|
||||
async signup(): Promise<void> {
|
||||
await super.create("users", { email: this.email, password: this.password });
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export default class LoginForm extends Vue {
|
|||
|
||||
private async doSignup() {
|
||||
await this.user.signup();
|
||||
// TODO: error handling, show confirmation page
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Reference in a new issue