1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

Run Linter

This commit is contained in:
Bradley Schofield 2023-08-09 23:51:36 +01:00
parent f4ef252bf2
commit c6302014f5
No known key found for this signature in database
GPG key ID: CDDF1217D7D66C9D
4 changed files with 10 additions and 9 deletions

View file

@ -659,7 +659,7 @@ return [
'description' => 'Too many queries.',
'code' => 400,
],
/** Migrations */
Exception::MIGRATION_NOT_FOUND => [
'name' => Exception::MIGRATION_NOT_FOUND,

View file

@ -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
{

View file

@ -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([

View file

@ -22,4 +22,4 @@ class Migrations extends Base
{
parent::__construct('migrations', self::ALLOWED_ATTRIBUTES);
}
}
}