Run Linter
This commit is contained in:
parent
f4ef252bf2
commit
c6302014f5
4 changed files with 10 additions and 9 deletions
|
@ -659,7 +659,7 @@ return [
|
|||
'description' => 'Too many queries.',
|
||||
'code' => 400,
|
||||
],
|
||||
|
||||
|
||||
/** Migrations */
|
||||
Exception::MIGRATION_NOT_FOUND => [
|
||||
'name' => Exception::MIGRATION_NOT_FOUND,
|
||||
|
|
|
@ -18,10 +18,10 @@ use Utopia\Migration\Sources\NHost;
|
|||
use Utopia\Migration\Sources\Supabase;
|
||||
use Utopia\Migration\Transfer;
|
||||
|
||||
require_once __DIR__.'/../init.php';
|
||||
require_once __DIR__ . '/../init.php';
|
||||
|
||||
Console::title('Migrations V1 Worker');
|
||||
Console::success(APP_NAME.' Migrations worker v1 has started');
|
||||
Console::success(APP_NAME . ' Migrations worker v1 has started');
|
||||
|
||||
class MigrationsV1 extends Worker
|
||||
{
|
||||
|
|
|
@ -198,9 +198,10 @@ class Firebase extends OAuth2
|
|||
/*
|
||||
Be careful with the setIAMPolicy method, it will overwrite all existing policies
|
||||
**/
|
||||
public function assignIAMRoles(string $accessToken, string $email, string $projectId) {
|
||||
public function assignIAMRoles(string $accessToken, string $email, string $projectId)
|
||||
{
|
||||
// Get IAM Roles
|
||||
$iamRoles = $this->request('POST', 'https://cloudresourcemanager.googleapis.com/v1/projects/'.$projectId.':getIamPolicy', [
|
||||
$iamRoles = $this->request('POST', 'https://cloudresourcemanager.googleapis.com/v1/projects/' . $projectId . ':getIamPolicy', [
|
||||
'Authorization: Bearer ' . \urlencode($accessToken),
|
||||
'Content-Type: application/json'
|
||||
]);
|
||||
|
@ -210,19 +211,19 @@ class Firebase extends OAuth2
|
|||
$iamRoles['bindings'][] = [
|
||||
'role' => 'roles/identitytoolkit.admin',
|
||||
'members' => [
|
||||
'serviceAccount:'.$email
|
||||
'serviceAccount:' . $email
|
||||
]
|
||||
];
|
||||
|
||||
$iamRoles['bindings'][] = [
|
||||
'role' => 'roles/firebase.admin',
|
||||
'members' => [
|
||||
'serviceAccount:'.$email
|
||||
'serviceAccount:' . $email
|
||||
]
|
||||
];
|
||||
|
||||
// Set IAM Roles
|
||||
$this->request('POST', 'https://cloudresourcemanager.googleapis.com/v1/projects/'.$projectId.':setIamPolicy', [
|
||||
$this->request('POST', 'https://cloudresourcemanager.googleapis.com/v1/projects/' . $projectId . ':setIamPolicy', [
|
||||
'Authorization: Bearer ' . \urlencode($accessToken),
|
||||
'Content-Type: application/json'
|
||||
], json_encode([
|
||||
|
|
|
@ -22,4 +22,4 @@ class Migrations extends Base
|
|||
{
|
||||
parent::__construct('migrations', self::ALLOWED_ATTRIBUTES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue