Fix parameter bindings for client API routes; closes pterodactyl/panel#2359
This commit is contained in:
parent
1db7e4db66
commit
f31a6d3967
3 changed files with 62 additions and 3 deletions
|
@ -49,11 +49,11 @@ class SubstituteClientApiBindings extends ApiSubstituteBindings
|
|||
return Database::query()->where('id', $id)->firstOrFail();
|
||||
});
|
||||
|
||||
$this->router->model('backup', Backup::class, function ($value) {
|
||||
$this->router->bind('backup', function ($value) {
|
||||
return Backup::query()->where('uuid', $value)->firstOrFail();
|
||||
});
|
||||
|
||||
$this->router->model('user', User::class, function ($value) {
|
||||
$this->router->bind('user', function ($value) {
|
||||
return User::query()->where('uuid', $value)->firstOrFail();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue