Skip to content

Commit

Permalink
$wire login
Browse files Browse the repository at this point in the history
  • Loading branch information
HolgerHatGarKeineNode committed Aug 23, 2023
1 parent 34d3da2 commit eebaa38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/Http/Livewire/Auth/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public function rules()
];
}

public function updatedUserProfile($value)
public function login($value)
{
if (isset($value['npub'])) {
$firstUser = User::query()->where('nostr', $value['npub'])->first();
if ($value) {
$firstUser = User::query()->where('nostr', $value)->first();
if ($firstUser) {
auth()->login($firstUser, true);

Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class="flex justify-center space-x-4"
});
await ndkUser.fetchProfile();
console.log(ndkUser);
this.userProfile = ndkUser.profile;
$wire.login(user.npub);
}
});
}
Expand Down

0 comments on commit eebaa38

Please sign in to comment.