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

Document api routes 2 #51

Merged
merged 6 commits into from
Feb 28, 2025
Merged

Document api routes 2 #51

merged 6 commits into from
Feb 28, 2025

Conversation

KevinBeltran23
Copy link
Contributor

Developer: Kevin Beltran

Closes #33

Pull Request Summary

create api routes to modify a document by id and also delete a document id

Modifications

I created a new directory in api and a dynamic route [id] with a route.ts file where the requests live

Testing Considerations

I tested the put and delete worked via console api requests. Should make sure my error handling is correct.

Pull Request Checklist

  • Code is neat, readable, and works
  • Comments are appropriate
  • The commit messages follows our guidelines
  • The developer name is specified
  • The summary is completed
  • Assign reviewers

Screenshots/Screencast

{put screenshots of your change, or even better a screencast displaying the functionality}

Copy link
Collaborator

@aarav27 aarav27 left a comment

Choose a reason for hiding this comment

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

Tested the routes through Postman and everything works great! The only thing change is to modify the routes to use API standardized responses.

@KevinBeltran23
Copy link
Contributor Author

I found an article online since I was unfamiliar with standardized api responses. Let me know if theres a specific format you want them in. Also there is a merge conflict since from recent merges I think. Not sure if that's something you want us to look at or for yourselves.

Copy link
Collaborator

@aarav27 aarav27 left a comment

Choose a reason for hiding this comment

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

Sorry for not being clear, what I meant was using the createSuccessResponse and createErrorResponse.
They are in the src/lib/response.ts

@KevinBeltran23
Copy link
Contributor Author

OH! Okay thanks I should have seen that. Let me know if anything still looks off. Thanks!

aarav27
aarav27 previously approved these changes Feb 28, 2025
Copy link
Collaborator

@aarav27 aarav27 left a comment

Choose a reason for hiding this comment

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

Well done, LGTM!

@aarav27 aarav27 removed the request for review from ktaschek February 28, 2025 23:51
@aarav27 aarav27 merged commit b4a36aa into develop Feb 28, 2025
4 checks passed
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.

Document API Routes - 2
2 participants