mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Add some debug.
This commit is contained in:
@@ -24,6 +24,7 @@ namespace FireflyIII\Console\Commands\Integrity;
|
|||||||
|
|
||||||
use FireflyIII\Support\System\OAuthKeys;
|
use FireflyIII\Support\System\OAuthKeys;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RestoreOAuthKeys
|
* Class RestoreOAuthKeys
|
||||||
@@ -93,7 +94,9 @@ class RestoreOAuthKeys extends Command
|
|||||||
*/
|
*/
|
||||||
private function restoreOAuthKeys(): void
|
private function restoreOAuthKeys(): void
|
||||||
{
|
{
|
||||||
|
Log::debug('Going to restoreOAuthKeys()');
|
||||||
if (!$this->keysInDatabase() && !$this->keysOnDrive()) {
|
if (!$this->keysInDatabase() && !$this->keysOnDrive()) {
|
||||||
|
Log::debug('Keys are not in DB and keys are not on the drive.');
|
||||||
$this->generateKeys();
|
$this->generateKeys();
|
||||||
$this->storeKeysInDB();
|
$this->storeKeysInDB();
|
||||||
$this->line('Generated and stored new keys.');
|
$this->line('Generated and stored new keys.');
|
||||||
@@ -101,12 +104,14 @@ class RestoreOAuthKeys extends Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->keysInDatabase() && !$this->keysOnDrive()) {
|
if ($this->keysInDatabase() && !$this->keysOnDrive()) {
|
||||||
|
Log::debug('Keys are in DB and keys are not on the drive. Restore.');
|
||||||
$this->restoreKeysFromDB();
|
$this->restoreKeysFromDB();
|
||||||
$this->line('Restored OAuth keys from database.');
|
$this->line('Restored OAuth keys from database.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!$this->keysInDatabase() && $this->keysOnDrive()) {
|
if (!$this->keysInDatabase() && $this->keysOnDrive()) {
|
||||||
|
Log::debug('Keys are not in DB and keys are on the drive. Save in DB.');
|
||||||
$this->storeKeysInDB();
|
$this->storeKeysInDB();
|
||||||
$this->line('Stored OAuth keys in database.');
|
$this->line('Stored OAuth keys in database.');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user