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

Reflect server's running state on load #26

Merged
merged 5 commits into from
Jun 20, 2019
Merged

Conversation

slai11
Copy link
Contributor

@slai11 slai11 commented Jun 15, 2019

Previously StatusSwitch always default to true. This was fixed by having StatusSwitch make a call to server on load to fetch latest state and keep it private within the component as there is no need for other components to be aware of the server's running state.

Also cleaned up endpoints

POST /policy
GET /policy

PUT /state/resume
PUT /state/pause
GET /state

@slai11 slai11 added the bug Something isn't working label Jun 15, 2019
@slai11 slai11 requested a review from guangie88 June 15, 2019 15:04
@slai11 slai11 self-assigned this Jun 15, 2019
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/store.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@guangie88 guangie88 left a comment

Choose a reason for hiding this comment

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

👍

@slai11 slai11 merged commit ca55af4 into master Jun 20, 2019
@slai11 slai11 deleted the reflect-server-state branch June 20, 2019 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants