Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Search does not work without api_key #633

Open
froi opened this issue Aug 13, 2018 · 0 comments
Open

Search does not work without api_key #633

froi opened this issue Aug 13, 2018 · 0 comments

Comments

@froi
Copy link
Contributor

froi commented Aug 13, 2018

Expected Behavior

Project should be able to consume an API without the api_key

Current Behavior

App is adding the api_key to the URL even though no api_key is specified. This makes the API return a 400 Bad Request. The api_key is a functionality that is not managed by the API.

Possible Solution

Set conditionals in the client.services.ts file to verify that the KEY variable is present / has value before concatenating the api_key query parameter.

Steps to Reproduce (for bugs)

  1. Have a local instance of code-gov-api running.
  2. Delete api key from code-gov-web config
  3. Set API URL to be localhost
  4. Run project
  5. Access project in any browser and execute a search
  6. Results should be empty

Context

Not being able to run this using a local instance without the need for an API key can/will hurt and person trying to test the project.

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

No branches or pull requests

2 participants