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

Admin should be able to edit mentor details #168

Closed
anjula-sack opened this issue Sep 15, 2024 · 9 comments · Fixed by #169
Closed

Admin should be able to edit mentor details #168

anjula-sack opened this issue Sep 15, 2024 · 9 comments · Fixed by #169
Assignees
Labels
admin Admin related task backend A backend task

Comments

@anjula-sack
Copy link
Member

Description:

  • Admin should be able to edit mentor details

Tasks:

  • We need an endpoint to update mentor details like category, name, profile picture etc

Acceptance Criteria:

  • There's an endpoint to update mentor details only accessible to admins
@anjula-sack anjula-sack added backend A backend task admin Admin related task labels Sep 15, 2024
@anjula-sack anjula-sack moved this to Groomed in ScholarX Sep 15, 2024
@anjula-sack
Copy link
Member Author

@Disura-Randunu Would you like to work on this?

@Disura-Randunu
Copy link
Contributor

@anjula-sack Sure. Should I prioritize this issue or #155

@anjula-sack
Copy link
Member Author

@anjula-sack Sure. Should I prioritize this issue or #155

You can prioritize this

@anjula-sack anjula-sack moved this from Groomed to In progress in ScholarX Sep 15, 2024
@Disura-Randunu
Copy link
Contributor

@anjula-sack img-url is a property of profile. Shall I make it possible to update other profile data within the mentor update as well?

@Disura-Randunu
Copy link
Contributor

Disura-Randunu commented Sep 16, 2024

@anjula-sack Also, since there's an image, it will be a form-data request. The issue is with type conversions specially with key-value pairs in the "application" property. those values will always be strings since we're passing them through a form data like below.
Screenshot 2024-09-16 134716

  1. we could pass all the other data as a JSON value in the form and parse it in the backend
  2. or we could convert in the backend but there will be multiple checks
  3. or else make a seperate API call for the image upload and then use the returned string as the imageUrl in another request along with other data.
  4. otherwise can just convert the image to base64 in fronend & convert it back but this is not ideal I think

I prefer the 1st one. what do you think?
image

@anjula-sack
Copy link
Member Author

Yeah let's go with first option since it's more flexible and we probably will refactor how we are handling the applications. @Disura-Randunu

@Disura-Randunu
Copy link
Contributor

@anjula-sack what about the profile data other than image? Should they be updatable within mentor update?

@anjula-sack
Copy link
Member Author

@anjula-sack what about the profile data other than image? Should they be updatable within mentor update?

yes

@Disura-Randunu
Copy link
Contributor

@anjula-sack added PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Admin related task backend A backend task
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants