-
Notifications
You must be signed in to change notification settings - Fork 11
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/reviews/all
API Endpoint to Include Review Status in Response
#295
Comments
In this case, I think it is now time to add a new status column to the DB so that we do not have to compute the status every time the API is called but just fetch it from the DB. |
I don't think that this is necessary. I'll try to explain my viewpoint: Here is an overview of how status works right now.
As outlined in Your suggestion is to add a new field that directly contains the status. While this would mean the What is the computational cost of filtering these reviews each time the |
I thought about this again and you're right about needing to maintain the code that computes the status resulting in additional code. Hence, I'm reevaluating my position for adding the column to db. As regards the computational cost of filtering these reviews each time the |
We currently use the
api/reviews/all
API endpoint to fetch reviews from our system. This endpoint allows us to apply various filters to tailor what is returned. However, there's an important piece of information missing from the responses: the status of each review.Issue Details
Currently, the status of each review is not included in the API response. As a result, client-side logic has been implemented to determine the status. This approach is not only redundant but also prone to errors, as maintaining this logic across different parts of the application can lead to inconsistencies and bugs.
Proposed Solution
To simplify the process and reduce the potential for errors, we should update the
api/reviews/all
endpoint to include the status of each review directly in the API response.The text was updated successfully, but these errors were encountered: