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

fix: run endpoint with output json by default#46

Open
jepser wants to merge 1 commit into
GoogleChromeLabs:masterfrom
jepser:fix-frontend-endpoint
Open

fix: run endpoint with output json by default#46
jepser wants to merge 1 commit into
GoogleChromeLabs:masterfrom
jepser:fix-frontend-endpoint

Conversation

@jepser

@jepser jepser commented Nov 26, 2018

Copy link
Copy Markdown

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

ebidel commented Nov 26, 2018

Copy link
Copy Markdown
Contributor

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

@jepser

jepser commented Nov 26, 2018

Copy link
Copy Markdown
Author

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