Fix trailing comma in DaemonAuthenticate.php, change ServerDetailsController.php to use node authentication

This commit is contained in:
Matthew Penner 2020-04-10 17:54:50 -06:00
parent a37e30cd49
commit 658a959e5d
2 changed files with 2 additions and 4 deletions

View file

@ -83,9 +83,7 @@ class ServerDetailsController extends Controller
*/
public function list(Request $request)
{
$authorization = substr($request->header('Authorization'), 7);
$node = $this->nodeRepository->findFirstWhere(['daemonSecret' => $authorization]);
$node = $request->attributes->get('node');
$servers = $this->repository->loadEveryServerForNode($node->id);
$configurations = [];

View file

@ -69,7 +69,7 @@ class DaemonAuthenticate
// Ensure that all of the correct parts are provided in the header.
if (count($parts) !== 2 || empty($parts[0]) || empty($parts[1])) {
throw new BadRequestHttpException(
'The Authorization headed provided was not in a valid format.',
'The Authorization headed provided was not in a valid format.'
);
}