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

Adds Get Endorsement End Point #40

Merged
merged 18 commits into from
Dec 16, 2023
Merged

Conversation

heyrandhir
Copy link
Contributor

@heyrandhir heyrandhir commented Nov 23, 2023

Date: 1 Dec 2023
Developer Name: @heyrandhir

Description:

This PR has the code changes for the APIs on the endpoint /v1/endorsements

Is Under Feature Flag

  • Yes
  • No

Database changes

  • Yes
  • No

Breaking changes (If your feature is breaking/missing something please mention pending tickets)

  • Yes
  • No

Is Development Tested?

  • Yes
  • No

Testing Stats :

image

image

Proof on local :

image

Since the complete response was not captured hence posting the complete response below :

GET Request to v1/endorsements/a9e48c1f-19b8-4c66-9ba2-5d8b7c80b2a6

{
    "data": {
        "createdBy": {
            "createdBy": null,
            "updatedBy": null,
            "createdAt": null,
            "updatedAt": null,
            "id": "a78a02a9-5738-406e-aa10-9ff49fdaee5a",
            "rdsUserId": "DtR9sK7CysOVHP17zl8N",
            "firstName": "Randhir",
            "lastName": "Kumar",
            "imageUrl": "https://res.cloudinary.com/realdevsquad/image/upload/v1673312957/profile/DtR9sK7CysOVHP17zl8N/bbtkpea622crqotnhsa3.jpg",
            "role": "USER",
            "skills": []
        },
        "updatedBy": {
            "createdBy": null,
            "updatedBy": null,
            "createdAt": null,
            "updatedAt": null,
            "id": "a78a02a9-5738-406e-aa10-9ff49fdaee5a",
            "rdsUserId": "DtR9sK7CysOVHP17zl8N",
            "firstName": "Randhir",
            "lastName": "Kumar",
            "imageUrl": "https://res.cloudinary.com/realdevsquad/image/upload/v1673312957/profile/DtR9sK7CysOVHP17zl8N/bbtkpea622crqotnhsa3.jpg",
            "role": "USER",
            "skills": []
        },
        "createdAt": "2023-01-15T12:30:00Z",
        "updatedAt": "2023-01-15T12:30:00Z",
        "id": "a9e48c1f-19b8-4c66-9ba2-5d8b7c80b2a6",
        "user": {
            "id": "a78a02a9-5738-406e-aa10-9ff49fdaee5a",
            "rdsUserId": "DtR9sK7CysOVHP17zl8N",
            "firstName": "Randhir",
            "lastName": "Kumar",
            "imageUrl": "https://res.cloudinary.com/realdevsquad/image/upload/v1673312957/profile/DtR9sK7CysOVHP17zl8N/bbtkpea622crqotnhsa3.jpg",
            "role": "USER",
            "skills": null
        },
        "skill": {
            "id": "a9e48c1f-19b8-4c66-9ba2-5d8b7c80b2a6",
            "type": "ATOMIC",
            "name": "Dummy Skill",
            "users": null
        },
        "status": "APPROVED",
        "endorsersList": [
            {
                "createdBy": {
                    "createdBy": null,
                    "updatedBy": null,
                    "createdAt": null,
                    "updatedAt": null,
                    "id": "a78a02a9-5738-406e-aa10-9ff49fdaee5a",
                    "rdsUserId": "DtR9sK7CysOVHP17zl8N",
                    "firstName": "Randhir",
                    "lastName": "Kumar",
                    "imageUrl": "https://res.cloudinary.com/realdevsquad/image/upload/v1673312957/profile/DtR9sK7CysOVHP17zl8N/bbtkpea622crqotnhsa3.jpg",
                    "role": "USER",
                    "skills": []
                },
                "updatedBy": {
                    "createdBy": null,
                    "updatedBy": null,
                    "createdAt": null,
                    "updatedAt": null,
                    "id": "a78a02a9-5738-406e-aa10-9ff49fdaee5a",
                    "rdsUserId": "DtR9sK7CysOVHP17zl8N",
                    "firstName": "Randhir",
                    "lastName": "Kumar",
                    "imageUrl": "https://res.cloudinary.com/realdevsquad/image/upload/v1673312957/profile/DtR9sK7CysOVHP17zl8N/bbtkpea622crqotnhsa3.jpg",
                    "role": "USER",
                    "skills": []
                },
                "createdAt": "2023-12-01T01:25:19Z",
                "updatedAt": "2023-12-01T01:25:19Z",
                "id": "7d36b769-8fe8-11ee-a493-0242ac120002",
                "endorser": {
                    "createdBy": null,
                    "updatedBy": null,
                    "createdAt": null,
                    "updatedAt": null,
                    "id": "a78a02a9-5738-406e-aa10-9ff49fdaee5a",
                    "rdsUserId": "DtR9sK7CysOVHP17zl8N",
                    "firstName": "Randhir",
                    "lastName": "Kumar",
                    "imageUrl": "https://res.cloudinary.com/realdevsquad/image/upload/v1673312957/profile/DtR9sK7CysOVHP17zl8N/bbtkpea622crqotnhsa3.jpg",
                    "role": "USER",
                    "skills": []
                },
                "description": "good in this skill",
                "deleted": false,
                "type": "POSITIVE"
            }
        ]
    },
    "message": "Data retrieved successfully"
}

@heyrandhir heyrandhir self-assigned this Nov 29, 2023
@heyrandhir heyrandhir changed the title [**DO NOT MERGE**]Adds Get Endorsement End Point Controller Model changes Adds Get Endorsement End Point Controller Model changes Dec 1, 2023
@heyrandhir heyrandhir changed the title Adds Get Endorsement End Point Controller Model changes Adds Get Endorsement End Point Dec 1, 2023
Copy link
Contributor

@bhtibrewal bhtibrewal left a comment

Choose a reason for hiding this comment

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

left few comments and didn't understand why the endorserslist has a different response than the EndorsementList model

@heyrandhir
Copy link
Contributor Author

left few comments and didn't understand why the endorserslist has a different response than the EndorsementList model

I didn't get the this part : endorserslist has a different response than the EndorsementList. you can explain here or connect over discord call sometime when free

@heyrandhir heyrandhir requested a review from bhtibrewal December 2, 2023 01:36
@vikhyat187
Copy link
Contributor

Hi @heyrandhir whatever dependency is there on the Auth PR, can you include those files in your PR?

@vikhyat187
Copy link
Contributor

In your PR we are sending the entire Model object in the response, which shouldn't be done, we can just have the user Id or user Name, @bhtibrewal @prakashchoudhary07 @Ajeyakrishna-k what are your thoughts on this?

@heyrandhir
Copy link
Contributor Author

Hi @heyrandhir whatever dependency is there on the Auth PR, can you include those files in your PR?

Its this entire PR #22 @vikhyat187. Without this PR, the route would encounter authentication errors. Additionally, I don't believe it's good idea to include those files in this PR, as it could be overwhelming for the reviewers to assess numerous changes within this context just for a GET route.

@heyrandhir
Copy link
Contributor Author

In your PR we are sending the entire Model object in the response, which shouldn't be done, we can just have the user Id or user Name, @bhtibrewal @prakashchoudhary07 @Ajeyakrishna-k what are your thoughts on this?

sure lets see what others have to say, will modify accordingly

@prakashchoudhary07
Copy link
Contributor

In your PR we are sending the entire Model object in the response, which shouldn't be done, we can just have the user Id or user Name, @bhtibrewal @prakashchoudhary07 @Ajeyakrishna-k what are your thoughts on this?

sure lets see what others have to say, will modify accordingly

What does the API contract say?

@vikhyat187
Copy link
Contributor

vikhyat187 commented Dec 12, 2023

In your PR we are sending the entire Model object in the response, which shouldn't be done, we can just have the user Id or user Name, @bhtibrewal @prakashchoudhary07 @Ajeyakrishna-k what are your thoughts on this?

sure lets see what others have to say, will modify accordingly

What does the API contract say?

Its the user Id as per the contracts I've written earlier @prakashchoudhary07
https://github.com/Real-Dev-Squad/skill-tree-backend/blob/develop/api-contracts.yml

cc : @heyrandhir

@heyrandhir heyrandhir merged commit 7d08526 into develop Dec 16, 2023
@heyrandhir heyrandhir deleted the feat/get-endorsement-endpoint branch December 16, 2023 10:32
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.

6 participants