sef-global / scholarx-backend

This is the backend of the ScholarX
MIT License
11 stars 41 forks source link

Save profile names capitalized at sign-in, mentee, and mentor applications #160

Closed Madhawa97 closed 2 months ago

Madhawa97 commented 3 months ago

Description: Ensure profile names are saved with the first letter of each word capitalized during sign-in, mentee, and mentor applications.

Tasks:

Acceptance Criteria:

Additional Information:

Related Dependencies or References:

Disura-Randunu commented 2 months ago

Hey @anjula-sack. Shall I work on this issue?

Madhawa97 commented 2 months ago

Sure go ahead! @Disura-Randunu

Disura-Randunu commented 2 months ago

@Madhawa97, @anjula-sack Where can I find the documentation that needs to be updated?

Disura-Randunu commented 2 months ago

Unit test for registration is failing because "profile" is null. But it's working as expected when the request is executed. (Profile returns in the body)

auth.service.ts : 44 - 48

    await profileRepository.save(newProfile)

    const savedProfile = await profileRepository.findOne({
      where: { primary_email: email }
    })

Might be becuase it takes some time for the DB to commit and "savedProfile" is empty at that time. Shall I change it as below?

const savedProfile = await profileRepository.save(newProfile)
anjula-sack commented 2 months ago

@Disura-Randunu Can you send the PR, then let's see what's happening based on your changes

Disura-Randunu commented 2 months ago

@anjula-sack added PR: https://github.com/sef-global/scholarx-backend/pull/167