Update calls to missing function

This commit is contained in:
Dane Everitt 2018-01-05 16:33:50 -06:00
parent 60eb60013c
commit 5f9fe4a69b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
45 changed files with 78 additions and 78 deletions

View file

@ -83,7 +83,7 @@ class SetDefaultAllocationService
}
$this->connection->beginTransaction();
$this->serverRepository->withoutFresh()->update($server->id, ['allocation_id' => $model->id]);
$this->serverRepository->withoutFreshModel()->update($server->id, ['allocation_id' => $model->id]);
// Update on the daemon.
try {

View file

@ -40,7 +40,7 @@ class PermissionService
public function create($key, $permission)
{
// @todo handle an array of permissions to do a mass assignment?
return $this->repository->withoutFresh()->create([
return $this->repository->withoutFreshModel()->create([
'key_id' => $key,
'permission' => $permission,
]);

View file

@ -75,7 +75,7 @@ class DaemonKeyCreationService
{
$secret = DaemonKeyRepositoryInterface::INTERNAL_KEY_IDENTIFIER . str_random(40);
$this->repository->withoutFresh()->create([
$this->repository->withoutFreshModel()->create([
'user_id' => $user,
'server_id' => $server,
'secret' => $secret,

View file

@ -78,7 +78,7 @@ class DaemonKeyUpdateService
Assert::integerish($key, 'First argument passed to handle must be an integer, received %s.');
$secret = DaemonKeyRepositoryInterface::INTERNAL_KEY_IDENTIFIER . str_random(40);
$this->repository->withoutFresh()->update($key, [
$this->repository->withoutFreshModel()->update($key, [
'secret' => $secret,
'expires_at' => $this->carbon->now()->addMinutes($this->config->get('pterodactyl.api.key_expire_time'))->toDateTimeString(),
]);

View file

@ -69,7 +69,7 @@ class DatabasePasswordService
$this->dynamic->set('dynamic', $database->database_host_id);
$this->connection->beginTransaction();
$updated = $this->repository->withoutFresh()->update($database->id, [
$updated = $this->repository->withoutFreshModel()->update($database->id, [
'password' => $this->encrypter->encrypt($password),
]);

View file

@ -57,6 +57,6 @@ class EggUpdateService
}
}
$this->repository->withoutFresh()->update($egg->id, $data);
$this->repository->withoutFreshModel()->update($egg->id, $data);
}
}

View file

@ -52,7 +52,7 @@ class InstallScriptService
}
}
$this->repository->withoutFresh()->update($egg->id, [
$this->repository->withoutFreshModel()->update($egg->id, [
'script_install' => array_get($data, 'script_install'),
'script_is_privileged' => array_get($data, 'script_is_privileged', 1),
'script_entry' => array_get($data, 'script_entry'),

View file

@ -89,7 +89,7 @@ class EggUpdateImporterService
// Update Existing Variables
collect($parsed->variables)->each(function ($variable) use ($egg) {
$this->variableRepository->withoutFresh()->updateOrCreate([
$this->variableRepository->withoutFreshModel()->updateOrCreate([
'egg_id' => $egg,
'env_variable' => $variable->env_variable,
], collect($variable)->except(['egg_id', 'env_variable'])->toArray());

View file

@ -64,7 +64,7 @@ class VariableUpdateService
$options = array_get($data, 'options') ?? [];
return $this->repository->withoutFresh()->update($variable->id, array_merge($data, [
return $this->repository->withoutFreshModel()->update($variable->id, array_merge($data, [
'user_viewable' => in_array('user_viewable', $options),
'user_editable' => in_array('user_editable', $options),
]));

View file

@ -42,6 +42,6 @@ class NestUpdateService
unset($data['author']);
}
$this->repository->withoutFresh()->update($nest, $data);
$this->repository->withoutFreshModel()->update($nest, $data);
}
}

View file

@ -72,7 +72,7 @@ class NodeUpdateService
unset($data['reset_secret']);
}
$updateResponse = $this->repository->withoutFresh()->update($node->id, $data);
$updateResponse = $this->repository->withoutFreshModel()->update($node->id, $data);
try {
$this->configRepository->setNode($node->id)->update();

View file

@ -70,6 +70,6 @@ class PackUpdateService
$data['visible'] = isset($data['visible']);
$data['locked'] = isset($data['locked']);
return $this->repository->withoutFresh()->update($pack->id, $data);
return $this->repository->withoutFreshModel()->update($pack->id, $data);
}
}

View file

@ -56,7 +56,7 @@ class TaskCreationService
throw new TaskIntervalTooLongException(trans('exceptions.tasks.chain_interval_too_long'));
}
$repository = ($returnModel) ? $this->repository : $this->repository->withoutFresh();
$repository = ($returnModel) ? $this->repository : $this->repository->withoutFreshModel();
$task = $repository->create([
'schedule_id' => $schedule,
'sequence_id' => $data['sequence_id'],

View file

@ -94,7 +94,7 @@ class DetailsModificationService
}
$this->connection->beginTransaction();
$this->repository->withoutFresh()->update($server->id, [
$this->repository->withoutFreshModel()->update($server->id, [
'owner_id' => array_get($data, 'owner_id'),
'name' => array_get($data, 'name'),
'description' => array_get($data, 'description', ''),
@ -125,7 +125,7 @@ class DetailsModificationService
}
$this->connection->beginTransaction();
$this->repository->withoutFresh()->update($server->id, ['image' => $image]);
$this->repository->withoutFreshModel()->update($server->id, ['image' => $image]);
try {
$this->daemonServerRepository->setNode($server->node_id)->setAccessServer($server->uuid)->update([

View file

@ -72,7 +72,7 @@ class ReinstallServerService
}
$this->database->beginTransaction();
$this->repository->withoutFresh()->update($server->id, [
$this->repository->withoutFreshModel()->update($server->id, [
'installed' => 0,
]);

View file

@ -91,7 +91,7 @@ class StartupModificationService
$results = $this->validatorService->handle(array_get($data, 'egg_id', $server->egg_id), array_get($data, 'environment', []));
$results->each(function ($result) use ($server) {
$this->serverVariableRepository->withoutFresh()->updateOrCreate([
$this->serverVariableRepository->withoutFreshModel()->updateOrCreate([
'server_id' => $server->id,
'variable_id' => $result->id,
], [

View file

@ -91,7 +91,7 @@ class SuspensionService
}
$this->database->beginTransaction();
$this->repository->withoutFresh()->update($server->id, [
$this->repository->withoutFreshModel()->update($server->id, [
'suspended' => $action === 'suspend',
]);

View file

@ -56,6 +56,6 @@ class PermissionCreationService
}
}
$this->repository->withoutFresh()->insert($insertPermissions);
$this->repository->withoutFreshModel()->insert($insertPermissions);
}
}

View file

@ -75,7 +75,7 @@ class ToggleTwoFactorService
throw new TwoFactorAuthenticationTokenInvalid;
}
$this->repository->withoutFresh()->update($user->id, [
$this->repository->withoutFreshModel()->update($user->id, [
'totp_authenticated_at' => Carbon::now(),
'use_totp' => (is_null($toggleState) ? ! $user->use_totp : $toggleState),
]);

View file

@ -72,7 +72,7 @@ class TwoFactorSetupService
$secret = $this->google2FA->generateSecretKey($this->config->get('pterodactyl.auth.2fa.bytes'));
$image = $this->google2FA->getQRCodeGoogleUrl($this->config->get('app.name'), $user->email, $secret);
$this->repository->withoutFresh()->update($user->id, [
$this->repository->withoutFreshModel()->update($user->id, [
'totp_secret' => $this->encrypter->encrypt($secret),
]);