Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🛠️ [TASK] : Create general configuration endpoint #926

Open
stevenj opened this issue Oct 2, 2024 · 0 comments
Open

🛠️ [TASK] : Create general configuration endpoint #926

stevenj opened this issue Oct 2, 2024 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@stevenj
Copy link
Collaborator

stevenj commented Oct 2, 2024

Summary

Create endpoint to retrieve a json configuration record

Description

The backend will store generalized json records in the "Config" table in the postgresql database.

This endpoint will look up that table, and return that record.

The basic structure of the endpoint is this:
GET /config -> 200: JSON

The Key structure of the Config entry in that table is:

"config","","" : <json data>

In addition, if the query is for a known IP address, any json configuration for that IP address is merged with the general json config.
The Key structure of the IP Address, Config entry in that table is::

"config","ipv4","xxx.xxx.xxx.xxx.xxx" : <json data?

The response will be the merged json.

If the config entry does not exist in the DB, do not return an error, just retun an empty json document:

{}
@stevenj stevenj added the good first issue Good for newcomers label Oct 2, 2024
@stevenj stevenj added this to the M4: Voting & Delegation milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: New
Development

No branches or pull requests

2 participants