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

Feat: implement get organizations #314

Merged

Conversation

Iretoms
Copy link
Contributor

@Iretoms Iretoms commented Aug 8, 2024

Description

Developed an API endpoint to retrieve the organizations a specific user belongs to with proper authentication and validation.
The endpoint is accessible at api/v1/organizations and accepts HTTP GET requests. The endpoint is secure and ensures that only authenticated users with appropriate permissions can access the data. Proper authentication mechanisms i.e. JWT was implemented. No request body is required.

API DOCS

Related Issue (Link to Github issue)

#313

How Has This Been Tested?

The code was tested using the inbuilt go testing library and all test cases passed as seen in the screenshot below. It ensured that there was a successful retrieval of organisations and the appropriate status code and success message were returned. It also ensured that an unauthenticated user cannot perform the action and the appropriate error code and message were returned.

Screenshots (if appropriate - Postman, etc):

Screenshot (71)
Screenshot (72)
Screenshot (73)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@Cyberguru1 Cyberguru1 left a comment

Choose a reason for hiding this comment

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

please update the swagger doc in static/swagger

Copy link
Contributor

@Cyberguru1 Cyberguru1 left a comment

Choose a reason for hiding this comment

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

all good

@Cyberguru1 Cyberguru1 merged commit c9a63e2 into hngprojects:dev Aug 8, 2024
4 of 5 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.

2 participants