|
@@ -5,9 +5,8 @@ import httpx
|
|
|
|
|
|
|
|
def main():
|
|
def main():
|
|
|
from_jwt, empire_uuid, to_jwt = sys.argv[1:]
|
|
from_jwt, empire_uuid, to_jwt = sys.argv[1:]
|
|
|
- from_headers = {'Authorization': 'Bearer ' + from_jwt}
|
|
|
|
|
|
|
|
|
|
- with httpx.Client(headers=from_headers) as from_client:
|
|
|
|
|
|
|
+ with httpx.Client(headers={'Authorization': 'Bearer ' + from_jwt}) as from_client:
|
|
|
empire: typing.Sequence[EmpirePlan] = from_client.get('https://api.prunplanner.org/baseplanner/empire/' + empire_uuid).raise_for_status().json()
|
|
empire: typing.Sequence[EmpirePlan] = from_client.get('https://api.prunplanner.org/baseplanner/empire/' + empire_uuid).raise_for_status().json()
|
|
|
shared: typing.Mapping[str, str] = {s['plan_uuid']: s['shared_uuid']
|
|
shared: typing.Mapping[str, str] = {s['plan_uuid']: s['shared_uuid']
|
|
|
for s in from_client.get('https://api.prunplanner.org/shared/list').raise_for_status().json()}
|
|
for s in from_client.get('https://api.prunplanner.org/shared/list').raise_for_status().json()}
|