Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Allow admins to enabled / disabled endpoints #168

Open
wants to merge 17 commits into
base: staging
Choose a base branch
from

Conversation

ASankaran
Copy link
Contributor

@ASankaran ASankaran commented Nov 24, 2017

Pull request implements the features described in #131.

  • Add endpoint for enabling and disabling other endpoints
  • Access to this feature is restricted to admins
  • Allow admins to query state of an endpoint
  • Maintain endpoint state in SQL database
  • Cache endpoint states in redis cache for faster access
  • Block access to disabled endpoints, return an error
  • Log enabling and disabling of endpoints

Copy link
Member

@YashoSharma YashoSharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I began reviewing this, but there are still console.log debug statements, let me know when this is ready for code review.

Additionally move this to a feature/EndpointAccess branch on Hackillinois/api

@@ -0,0 +1,5 @@
CREATE TABLE `endpoints` (
`endpoint` VARCHAR(50) NOT NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's up this to 127 to leave a healthy margin

@@ -0,0 +1,5 @@
CREATE TABLE `endpoints` (
`endpoint` VARCHAR(50) NOT NULL,
`enabled` BIT(1),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use TINYINT(1) for consistency with the rest of the schema

@@ -0,0 +1,5 @@
CREATE TABLE `endpoints` (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoint_state

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.

None yet

2 participants