This took an ungodly long amount of time to debug as the cause of issues frontend.
This commit is contained in:
parent
32b6bfbbe5
commit
ae843a72c6
1 changed files with 3 additions and 12 deletions
|
@ -121,7 +121,9 @@ class Server extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a single server specified by UUID
|
||||
* Returns a single server specified by UUID.
|
||||
* DO NOT USE THIS TO MODIFY SERVER DETAILS OR SAVE THOSE DETAILS.
|
||||
* YOU WILL OVERWRITE THE SECRET KEY AND BREAK THINGS.
|
||||
*
|
||||
* @param string $uuid The Short-UUID of the server to return an object about.
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
|
@ -147,17 +149,6 @@ class Server extends Model
|
|||
$result->daemonSecret = self::getUserDaemonSecret($result);
|
||||
}
|
||||
|
||||
// Prevent saving of model called in this manner.
|
||||
// Prevents accidental overwrite of main daemon secret.
|
||||
$result::saving(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
// Prevent deleting this model call.
|
||||
$result::deleting(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
self::$serverUUIDInstance[$uuid] = $result;
|
||||
return self::$serverUUIDInstance[$uuid];
|
||||
|
||||
|
|
Loading…
Reference in a new issue