More code cleanup.
This commit is contained in:
parent
c70d31c08f
commit
8dc1f41b73
|
@ -149,7 +149,7 @@ class APIRepository
|
||||||
$secretKey = str_random(16) . '.' . str_random(7) . '.' . str_random(7);
|
$secretKey = str_random(16) . '.' . str_random(7) . '.' . str_random(7);
|
||||||
$key = new Models\APIKey;
|
$key = new Models\APIKey;
|
||||||
$key->fill([
|
$key->fill([
|
||||||
'user' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'public' => str_random(16),
|
'public' => str_random(16),
|
||||||
'secret' => Crypt::encrypt($secretKey),
|
'secret' => Crypt::encrypt($secretKey),
|
||||||
'allowed_ips' => empty($this->allowed) ? null : json_encode($this->allowed),
|
'allowed_ips' => empty($this->allowed) ? null : json_encode($this->allowed),
|
||||||
|
|
|
@ -48,7 +48,6 @@ class NotificationService
|
||||||
public function __construct(Server $server)
|
public function __construct(Server $server)
|
||||||
{
|
{
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
$this->user = User::findOrFail($server->owner_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pass(array $notification)
|
public function pass(array $notification)
|
||||||
|
|
Loading…
Reference in New Issue