linkpoolio / asset-price-cl-ea

External Adaptor for Chainlink which aggregates prices of crypto assets from multiple exchanges.
MIT License
23 stars 17 forks source link

Invalid path: GCP deployment #18

Open PatrickAlphaC opened 4 years ago

PatrickAlphaC commented 4 years ago

Hi Jonny,

I'm testing this with deployment to the GCP, I'm running into an issue when testing:

{ "jobRunId": "1234", "data": { "base": "BTC", "quote": "USD" }}

And the response I get it:

{"jobRunId":"1234","status":"errored","error":"Invalid path","pending":false,"data":{"base":"BTC","quote":"USD"}}

Running locally and testing with a curl command seems to work perfectly.

PatrickAlphaC commented 4 years ago

I got it. I can't say my go skills are good enough to fix it, but if you swap the Path in the func Opts() in bridge.go to "/", you can deploy to the GCP without any problems.

func (ap *AssetPrice) Opts() *bridges.Opts {
    return &bridges.Opts{
        Name:   "Asset Price",
        Lambda: true,
        Path:   "/",
    }
}