Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

fix: run endpoint with output json by default #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jepser
Copy link

@jepser jepser commented Nov 26, 2018

https://lighthouse-ci.appspot.com/run_on_chrome it was failing if output is not provided. So now it works by set output property to json by default.

This didn't work:

curl --request POST \
  --url https://lighthouse-ci.appspot.com/run_on_chrome \
  --header 'content-type: application/json' \
  --header 'x-api-key: <key>' \
  --data '{
  "testUrl": "<test>",
  "addComment": false,
  "repo": {
    "owner": "<owner>",
    "name": "<name>"
  },
  "pr": {
    "number": "<pr>"
  }
}'

With this PR it does.

@ebidel
Copy link
Contributor

ebidel commented Nov 26, 2018

This should already be taken care of here: https://github.com/ebidel/lighthouse-ci/blob/master/frontend/server.js#L172

@jepser
Copy link
Author

jepser commented Nov 26, 2018

It's but if you send the payload without output property it breaks (as in the docs), so I decided instead of changing the docs, to add the default value.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants