Skip to content

Commit

Permalink
Updated api endpoint method names to support perceived jussi routing …
Browse files Browse the repository at this point in the history
…reqs #33
  • Loading branch information
relativityboy committed Jan 4, 2018
1 parent 8ef8ab8 commit 838c2df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hive/server/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@
methods = AsyncMethods()
legacy_methods = AsyncMethods()
legacy_methods.add(condenser_api.call, 'call')
methods.add(condenser_api.call, 'call')
legacy_methods.add(condenser_api.call, 'hive_api.condenser_api.legacy.call')
#methods.add(condenser_api.call, 'call')
for m in jrpc_methods:
methods.add(m)
for m in jrpc_condenser:
methods.add(m, 'condenser_api.' + m.__name__)
methods.add(m, 'hive_api.condenser_api.' + m.__name__)
# legacy_methods.add(m, 'condenser_api.' + m.__name__)
legacy_methods.add(m)


Expand Down Expand Up @@ -110,7 +112,7 @@ async def health(request):
async def jsonrpc_handler(request):
request = await request.text()
response = await methods.dispatch(request)
return web.json_response(response, status=200)
return web.json_response(response, status=200, headers={'Access-Control-Allow-Origin': '*'})

async def legacy_handler(request):
request = await request.text()
Expand Down

0 comments on commit 838c2df

Please sign in to comment.