mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-20 13:19:26 +01:00
Fix pint issues
This commit is contained in:
parent
e7ad0df6a3
commit
1fdedddd6b
@ -106,7 +106,7 @@ public function update(TwoFAccountUpdateRequest $request, TwoFAccount $twofaccou
|
|||||||
$this->authorize('update', $twofaccount);
|
$this->authorize('update', $twofaccount);
|
||||||
|
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
|
|
||||||
$twofaccount->fillWithOtpParameters($validated, $twofaccount->icon && is_null(Arr::get($validated, 'icon', null)));
|
$twofaccount->fillWithOtpParameters($validated, $twofaccount->icon && is_null(Arr::get($validated, 'icon', null)));
|
||||||
$request->user()->twofaccounts()->save($twofaccount);
|
$request->user()->twofaccounts()->save($twofaccount);
|
||||||
|
|
||||||
|
@ -32,9 +32,6 @@ class IconStoreService
|
|||||||
*/
|
*/
|
||||||
protected Sanitizer $svgSanitizer;
|
protected Sanitizer $svgSanitizer;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function __construct(Sanitizer $svgSanitizer)
|
public function __construct(Sanitizer $svgSanitizer)
|
||||||
{
|
{
|
||||||
$this->usesDatabase = Settings::get('storeIconsInDatabase');
|
$this->usesDatabase = Settings::get('storeIconsInDatabase');
|
||||||
|
@ -30,9 +30,6 @@ class LogoService
|
|||||||
*/
|
*/
|
||||||
const TFA_IMG_URL = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/';
|
const TFA_IMG_URL = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/';
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->setTfaCollection();
|
$this->setTfaCollection();
|
||||||
|
@ -829,12 +829,12 @@ public function test_update_with_removed_icon_prevents_official_logo_fetching()
|
|||||||
'legacy_uri' => OtpTestData::TOTP_SHORT_URI,
|
'legacy_uri' => OtpTestData::TOTP_SHORT_URI,
|
||||||
'icon' => 'icon.png',
|
'icon' => 'icon.png',
|
||||||
]);
|
]);
|
||||||
$twofaccount = TwoFAccount::factory()->for($this->user)->create($attributes);
|
$twofaccount = TwoFAccount::factory()->for($this->user)->create($attributes);
|
||||||
$attributes['icon'] = '';
|
$attributes['icon'] = '';
|
||||||
|
|
||||||
$response = $this->actingAs($this->user, 'api-guard')
|
$response = $this->actingAs($this->user, 'api-guard')
|
||||||
->json('PUT', '/api/v1/twofaccounts/' . $twofaccount->id, $attributes);
|
->json('PUT', '/api/v1/twofaccounts/' . $twofaccount->id, $attributes);
|
||||||
|
|
||||||
$this->assertNull($response->json('icon'));
|
$this->assertNull($response->json('icon'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,9 +26,6 @@ class IconServiceTest extends FeatureTestCase
|
|||||||
{
|
{
|
||||||
use WithoutMiddleware;
|
use WithoutMiddleware;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
protected IconService $iconService;
|
protected IconService $iconService;
|
||||||
|
|
||||||
public function setUp() : void
|
public function setUp() : void
|
||||||
|
Loading…
Reference in New Issue
Block a user