api(client): fix TwoFactorController

This commit is contained in:
Matthew Penner 2021-03-06 15:53:45 -07:00
parent 5fe86f164e
commit 5d1568cf84
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class TwoFactorController extends ClientApiController
* Disables two-factor authentication on an account if the password provided
* is valid.
*/
public function delete(Request $request): JsonResponse
public function delete(Request $request): Response
{
if (!password_verify($request->input('password') ?? '', $request->user()->password)) {
throw new BadRequestHttpException('The password provided was not valid.');

View File

@ -68,7 +68,7 @@ class ExecuteScheduleTest extends ClientApiIntegrationTestCase
$response->assertStatus(Response::HTTP_BAD_REQUEST);
$response->assertJsonPath('errors.0.code', 'BadRequestHttpException');
$response->assertJsonPath('errors.0.detail', 'Cannot trigger schedule exection for a schedule that is not currently active.');
$response->assertJsonPath('errors.0.detail', 'Cannot trigger schedule exception for a schedule that is not currently active.');
}
/**