Fix exception when modifying existing DB host, closes #910

This commit is contained in:
Dane Everitt 2018-02-04 12:59:14 -06:00
parent de1d9502c1
commit ff8b5fc5a3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 3 additions and 2 deletions

View file

@ -10,6 +10,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* `[rc.1]` — Fixes exception thown when attempting to adjust mail settings as well as a validation error thrown afterwards.
* `[rc.1]` — Fixes bug preventing modification of the default value for an Egg variable.
* `[rc.1]` — Fixed a bug that would occur when attempting to reset the daemon secret for a node.
* `[rc.1]` — Fix exception thrown when attempting to modify an existing database host.
## v0.7.0-rc.1 (Derelict Dermodactylus)
### Fixed

View file

@ -100,7 +100,7 @@ class DatabaseController extends Controller
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function view($host): View
public function view(int $host): View
{
return view('admin.databases.view', [
'locations' => $this->locationRepository->getAllWithNodes(),

View file

@ -23,7 +23,7 @@ class DatabaseHostFormRequest extends AdminFormRequest
}
if ($this->method() !== 'POST') {
return DatabaseHost::getUpdateRulesForId($this->route()->parameter('host')->id);
return DatabaseHost::getUpdateRulesForId($this->route()->parameter('host'));
}
return DatabaseHost::getCreateRules();