Skip to content

Prishpat — Backend Onboarding#19

Closed
prishpat19 wants to merge 2 commits intoUWOrbital:mainfrom
prishpat19:main
Closed

Prishpat — Backend Onboarding#19
prishpat19 wants to merge 2 commits intoUWOrbital:mainfrom
prishpat19:main

Conversation

@prishpat19
Copy link

No description provided.

"""
# TODO:(Member) Implement this endpoint
command = db.get(Command, id)
if not command:
Copy link
Contributor

Choose a reason for hiding this comment

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

Use command is None here

@@ -1,8 +1,12 @@
import time
Copy link
Contributor

Choose a reason for hiding this comment

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

Import what you need from the module as this follows our import convention.

Comment on lines 8 to 9
import logging
custom_logger = logging.getLogger("my_logger")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here

@Yarik-Popov Yarik-Popov changed the title Backend Onboarding Prishpat — Backend Onboarding May 6, 2025
Copy link
Contributor

@Yarik-Popov Yarik-Popov left a comment

Choose a reason for hiding this comment

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

Overall good start to the backend onboarding. Some changes are needed to improve it

@return Response from endpoint
"""
# TODO:(Member) Finish implementing this method
start_time = time.time()
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor you should use perf_counter here instead

custom_logger.info(f"Query Params: {dict(request.query_params)}")

# Process request
response = await call_next(request)
Copy link
Contributor

Choose a reason for hiding this comment

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

Print the response body as well

)


raise ValueError("Both 'params' and 'format' must be None or must have the same number of comma-separated values.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Print the params and format values

@prishpat19 prishpat19 closed this by deleting the head repository May 9, 2025
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