[U] login.comp

This commit is contained in:
Jan 2020-10-30 15:11:33 +01:00
parent 7f10bf776e
commit 1a79068215
3 changed files with 4 additions and 2 deletions

View file

@ -63,6 +63,7 @@ export class SupaService {
password password
); );
this.user.next(res.body.user); this.user.next(res.body.user);
this.supabaseUser = res.body.user;
return res.body.user; return res.body.user;
} catch (e) { } catch (e) {
console.error('Login', e); console.error('Login', e);
@ -82,6 +83,7 @@ export class SupaService {
password password
); );
this.user.next(res.body.user); this.user.next(res.body.user);
this.supabaseUser = res.body.user;
return res.body.user; return res.body.user;
} catch (e) { } catch (e) {
console.error('Signup', e); console.error('Signup', e);

View file

@ -16,7 +16,7 @@
<button class="btn btn-primary text-uppercase" type="submit" (click)="login(email.value, password.value)"> <button class="btn btn-primary text-uppercase" type="submit" (click)="login(email.value, password.value)">
Log in Log in
</button> or </button> or
<a class="btn btn-secondary text-uppercase" [routerLink]="'/signup'"> <a class="btn btn-secondary text-uppercase" (click)="router.navigate(['/signup'])">
signup signup
</a> </a>
</div> </div>

View file

@ -10,7 +10,7 @@ import { SupaService } from '../api/supabase/supa.service';
export class LoginComponent implements OnInit { export class LoginComponent implements OnInit {
constructor( constructor(
private router: Router, public router: Router,
private supa: SupaService, private supa: SupaService,
) { } ) { }