diff --git a/app/Repositories/APIRepository.php b/app/Repositories/APIRepository.php index 382e6a27..14348b2d 100644 --- a/app/Repositories/APIRepository.php +++ b/app/Repositories/APIRepository.php @@ -149,7 +149,7 @@ class APIRepository $secretKey = str_random(16) . '.' . str_random(7) . '.' . str_random(7); $key = new Models\APIKey; $key->fill([ - 'user' => $this->user->id, + 'user_id' => $this->user->id, 'public' => str_random(16), 'secret' => Crypt::encrypt($secretKey), 'allowed_ips' => empty($this->allowed) ? null : json_encode($this->allowed), diff --git a/app/Services/NotificationService.php b/app/Services/NotificationService.php index abd2155b..53a6e0ff 100644 --- a/app/Services/NotificationService.php +++ b/app/Services/NotificationService.php @@ -48,7 +48,6 @@ class NotificationService public function __construct(Server $server) { $this->server = $server; - $this->user = User::findOrFail($server->owner_id); } public function pass(array $notification)