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

Search does not work without api_key #633

Description

@froi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions