mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Make sure we're revoking API keys before throwing an exception
This commit is contained in:
parent
d13cb6f949
commit
3f603995f5
1 changed files with 3 additions and 3 deletions
|
|
@ -340,6 +340,9 @@ class Migrations extends Action
|
|||
$migrationDocument->setAttribute('errors', $errorMessages);
|
||||
}
|
||||
} finally {
|
||||
if ($tempAPIKey) {
|
||||
$this->removeAPIKey($tempAPIKey);
|
||||
}
|
||||
if ($migrationDocument) {
|
||||
$this->updateMigrationDocument($migrationDocument, $projectDocument);
|
||||
|
||||
|
|
@ -347,9 +350,6 @@ class Migrations extends Action
|
|||
throw new Exception(implode("\n", $migrationDocument->getAttribute('errors', []));
|
||||
}
|
||||
}
|
||||
if ($tempAPIKey) {
|
||||
$this->removeAPIKey($tempAPIKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue