Skip to content
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

implemented api routes that calls both camera and gpt service #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eriysd
Copy link
Collaborator

@eriysd eriysd commented Nov 11, 2024

Description

Fixes # (issue)
#40

  • introducing new routes that combines camera service and gpt service to aggregate the backend call made by the client

Issues Faced and Resolutions

Please describe any issues you encountered during development and how you resolved them.

  • Issue: initially tried to make calls to cameraController and gptController and use the returned promises to coordinate.
    • Failed because it was returning multiple jason res
    • Resolution: pivoted to making cameraService and gptService

How To Test?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Testcase 1: Postman testing - success

Do:

Expect:

  • Get 200 status with message and data.
  • Check the __upload folder and confirm that the photo is uploaded
  • The server terminal should print "inside the gpt service"
Screenshot 2024-11-11 at 3 45 19 PM

Terminal output
Screenshot 2024-11-11 at 3 36 41 PM

Testcase 2: Postman testing - fail

Do:

Expect:

  • Get 400 error as shown below
  • no terminal output as it should not call the gpt service
Screenshot 2024-11-11 at 3 46 28 PM

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.

1 participant