-
Notifications
You must be signed in to change notification settings - Fork 151
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
Implement retrieval "Farm" APIs #554
Conversation
87970e1
to
b78c3fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed and tested your code.
I have left some comments for requested changes. Please check them.
If you have any question about them, please let me know.
Also, please add a commit message explaining the context for this commit. For instance, why are we doing all of this? Why do we need this new API end point?
Thank you very much!!!
f4d617c
to
3e543e5
Compare
@vincent-olivert-riera |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all the comments. This looks good to merge, but there are a couple of missing new-line characters in the two JSON files that we have added. Please fix them.
Another thing I wanted to tell you. Since you have force-pushed all your changes, I had to review all your code again.
Instead, it is better to use the --fixup
option. For instance, if you are making changes to the code that was previously added by commit 3e543e5, after doing git add
to add the new changes, use git commit --fixup=3e543e5
to create a new commit, and then push it. That way you can tell me "I have addressed this comment on commit XXXXXX", and I can review only that.
After the review is complete and the code is considered good, you can easily squash all those extra "fixup" commits automatically by doing: git rebase -i master --autosquash
, and do a final force-push.
Please, try to do it that way for the requested changes in the JSON files. If you need any help, please ask me.
Thank you very much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Please, squash all the fixup commits for final review and approval.
Thanks!
We intend to improve the UI/UX when adding a new Project by enhancing the registration process for Farms on the "Register Project" page. To prepare for this improvement, we have added two API endpoints to retrieve Farm's data.
81e1b0d
to
3eeaf4c
Compare
Thank you so much. I squashed and force pushed for final review. 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Adding 2 APIs for retrieving Farm's data:
GET /rest/farm
Returns a JSON array of all farms in Promgen.
Available request params:
Sample response:
GET /rest/farm/:id
Returns the farm matching the ID as a JSON object, including the list of hosts.
Sample response: