sef-global / scholarx-backend

This is the backend of the ScholarX
MIT License
8 stars 32 forks source link

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

Closed Madhawa97 closed 6 months ago

Madhawa97 commented 7 months ago

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

Related PRs

## Test environment ## Learning
Madhawa97 commented 7 months ago

Tests are passing locally.

image
anjula-sack commented 6 months ago

@Madhawa97 Can you add the requested changes?

Madhawa97 commented 6 months ago

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