-
Notifications
You must be signed in to change notification settings - Fork 38
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
Removed unused code related to the v1 & Intacct API #4293
base: main
Are you sure you want to change the base?
Conversation
wouldn't be hard to toss django-rest-framework altogether in this scenario as we talked about on Monday but wasn't sure if we wanted to do a manual API Key implementation or if there would be any additional APIs in the future that would need some framework. also added some documentation but if we do end up adding a lot more endpoints in the future it may be smart to leverage swagger or something |
unpublished rounds also show up as open in the endpoint output because of #3867, which will probably be my next focus |
It would be great to handle the removal of drf-dependency in another PR. Manual API key is not too hard. We can use django-ninja, but I don't see the need for it now, simple JSONResponse would do. Regarding docs, simple Markdown-based docs will work best. That allows you to document any rate limit, authentication, and sample requests. |
# def get_context_data(self, **kwargs): | ||
# invoice = self.get_object() | ||
# project = invoice.project | ||
# return super().get_context_data(**kwargs) |
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.
Remove this completely?
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.
ah great catch! I originally intended to, slipped by me
I think we should remove it all. The "rounds/open" end point can be rebuilt and token is likely overkill for that endpoint. Just rate limiting it should be enough, the content you get is the same that is displayed on the front page in any case. |
A lot of work went it to this code but since we are not using it it's good to get out of the way. I do not know of anyone using the "rounds/open" endpoint. |
I tossed the endpoint, could definitely see the utility of one like it in the future though |
@wes-otf Do a That will update Then attempt to commit and the pre-commit hook will notice that the |
2408680
to
5fcf095
Compare
@frjo thanks for that pointer - still learning the uv ropes! I believe all should be good to go now |
Removes unused/unmaintained code that was pertaining to the previous React frontend along with the attempted Intacct API integrations. The only RESTful endpoint left is
/api/v1/rounds/open
, which (when utilizing an API key created in Django Admin) will return a JSON output of all available rounds.Test Steps
/api/v1/rounds/open
endpoint works as it did before