mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Fixes bug preventing proper updating of caches and models due to undefined Auth::user()
This commit is contained in:
@@ -142,8 +142,10 @@ class ServerObserver
|
||||
public function updated(Server $server)
|
||||
{
|
||||
// Clear Caches
|
||||
Cache::forget('Server.byUuid.' . $server->uuid . Auth::user()->uuid);
|
||||
Cache::forget('Server.byUuid.' . $server->uuidShort . Auth::user()->uuid);
|
||||
if (Auth::user()) {
|
||||
Cache::forget('Server.byUuid.' . $server->uuid . Auth::user()->uuid);
|
||||
Cache::forget('Server.byUuid.' . $server->uuidShort . Auth::user()->uuid);
|
||||
}
|
||||
|
||||
event(new Events\Server\Updated($server));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user