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

API routes setup #10

Merged
merged 8 commits into from
Sep 15, 2020
Merged

API routes setup #10

merged 8 commits into from
Sep 15, 2020

Conversation

MakMuftic
Copy link
Member

@MakMuftic MakMuftic commented Sep 11, 2020

API routes setup PR:

  • create util function for decoding JSON body to provided structure
  • added not implemented /api/v1/nodes - register endpoint --> initial setup for Register endpoint #7
  • added test setup for API router
  • removed unnecessary dependencies and loading config files

@MakMuftic MakMuftic self-assigned this Sep 11, 2020
@MakMuftic MakMuftic marked this pull request as draft September 11, 2020 09:27
@MakMuftic MakMuftic marked this pull request as ready for review September 11, 2020 12:36
@mpetrunic
Copy link
Member

Pls separate in separate prs.

@mpetrunic
Copy link
Member

Pls separate in smaller prs.

1 similar comment
@mpetrunic
Copy link
Member

Pls separate in smaller prs.

@MakMuftic MakMuftic force-pushed the mmuftic/register-endpoint branch from ed098f3 to 41d3bae Compare September 11, 2020 14:50
@MakMuftic MakMuftic requested a review from mpetrun5 September 11, 2020 15:26
@MakMuftic MakMuftic requested a review from mpetrunic September 14, 2020 12:50
return mr.Msg
}

func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error {
Copy link
Member

Choose a reason for hiding this comment

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

We should probably write tests for this at some point

Copy link
Member Author

Choose a reason for hiding this comment

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

Created issue for this #18

@MakMuftic MakMuftic merged commit f0e7a99 into master Sep 15, 2020
@MakMuftic MakMuftic deleted the mmuftic/register-endpoint branch September 15, 2020 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants