Skip to content

Refactored gog.js file#55

Open
Mehulantony wants to merge 1 commit intomainfrom
gog-refactor
Open

Refactored gog.js file#55
Mehulantony wants to merge 1 commit intomainfrom
gog-refactor

Conversation

@Mehulantony
Copy link
Copy Markdown
Collaborator

Refactored the controllers/gog.js file for better code clarity and readability. Introduced shared constants (GOG_PRODUCTION_AGENT_ID, DEFAULT_LIMIT, DEFAULT_SKIP, JSON_CONTENT_TYPE) to replace hardcoded values. Also included two helper functions setJsonResponseType(res) to standardize response headers and runAggregation(pipeline) to encapsulate repeated MongoDB aggregation logic and error handling.

@allenbakki
Copy link
Copy Markdown
Collaborator

its good

Copy link
Copy Markdown
Collaborator

@thehabes thehabes left a comment

Choose a reason for hiding this comment

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

I did not take this file into account earlier on in the project. It is specific proprietary functionality that only the RCG RERUM needs. I have made a new issue for consideration regarding these endpoints - #65

I did not formally review this code once I realized this file and the related endpoints should be removed. Apologies for my oversight

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