Skip to content

Commit

Permalink
Merge pull request #46 from ImMin5/master
Browse files Browse the repository at this point in the history
Add token key for make_grpc_metadata
  • Loading branch information
ImMin5 authored Jan 5, 2024
2 parents 81d255d + ebc39a3 commit 378c081
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spacectl/command/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,13 @@ def _call_api(client, resource, verb, params=None, **kwargs):


def _make_grpc_metadata(config: dict) -> tuple:
api_key = config.get('api_key')
token = config.get('token', config.get('api_key'))
x_domain_id = config.get('x_domain_id')
x_workspace_id = config.get('x_workspace_id')

metadata = ()
if api_key:
metadata += (('token', api_key),)
if token:
metadata += (('token', token),)

if x_domain_id:
metadata += (('x_domain_id', x_domain_id),)
Expand Down

0 comments on commit 378c081

Please sign in to comment.