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

Update get mentor categories endpoint (public) to send category IDs #83

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

Madhawa97
Copy link
Member

@Madhawa97 Madhawa97 commented Dec 23, 2023

Purpose

The purpose of this PR is to fix #82

Goals

Currently, the api/categories endpoint only returns a list of category names. The category IDs are also required during the mentor application process.

Approach

Add the category IDs to the response.
Sample response:

{
    "categories": [
        {
            "category": "Data Science",
            "id": "95ba00c0-8173-43c4-9573-6b481b4085e2"
        },
        {
            "category": "Random Category",
            "id": "fe7ca629-4f5e-440a-86cb-d54f8b98ec5f"
        },
        {
            "category": "Computer Science",
            "id": "fef68adb-e710-4d9e-8772-dc4905885088"
        }
    ],
    "message": "All Categories found"
}

Screenshots

N/A

Checklist

  • This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
  • I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Related PRs

Test environment

Learning

@Madhawa97
Copy link
Member Author

Tests are passing locally.
image

src/services/category.service.ts Outdated Show resolved Hide resolved
@anjula-sack
Copy link
Member

@Madhawa97 Can you add the requested changes?

@Madhawa97
Copy link
Member Author

Madhawa97 commented Jan 3, 2024

Hi @anjula-sack, Can you check now, please?
update: Tests are still passing locally

Copy link
Member

@anjula-sack anjula-sack left a comment

Choose a reason for hiding this comment

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

Thank you @Madhawa97

@anjula-sack anjula-sack merged commit 7f70862 into sef-global:main Jan 3, 2024
1 check failed
anjula-sack pushed a commit to anjula-sack/scholarx-backend that referenced this pull request Jul 23, 2024
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.

Update get mentor categories endpoint (public) to send category IDs
2 participants