From 0a518cd47e51f3414769a9ed09f93cd29f4f124e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 29 Jan 2024 20:03:14 +0000 Subject: [PATCH] Fix failing tests --- app/controllers/api/account.php | 1 + app/controllers/shared/api.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 53168f0b9a..4ee18acaf6 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2866,6 +2866,7 @@ App::post('/v1/account/verification/phone') ->desc('Create phone verification') ->groups(['api', 'account', 'auth']) ->label('scope', 'account') + ->label('auth.type', 'phone') ->label('event', 'users.[userId].verification.[tokenId].create') ->label('audits.event', 'verification.create') ->label('audits.resource', 'user/{response.userId}') diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 41aa7f607d..cf99723586 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -365,7 +365,7 @@ App::init() break; default: - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Unsupported authentication route'); + throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Unsupported authentication type: ' . $route->getLabel('auth.type', '')); break; } });