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

#2764 Create set logo endpoint #2834

Merged

Conversation

chpy04
Copy link
Contributor

@chpy04 chpy04 commented Sep 12, 2024

Changes

Added a setLogo endpoint to "/organizations/images/update" that lets an admin user update the logo for the organization.

Notes

Could not manually test uploadFile() function with postman, so manual override was used for this function in screenshots

Test Cases

Case A: fails if user is not an admin
Case B: updates logo if no previous logo exists
Case C: updates a previously existing logo

Screenshots

Successful Postman Response (await uploadFile() was replaced with {id: "123"})
logoUploadSuccess

Error Postman Response if no image is supplied
logoUploadError

Closes #2764

@chpy04 chpy04 self-assigned this Sep 12, 2024
Copy link
Member

@walker-sean walker-sean left a comment

Choose a reason for hiding this comment

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

Nice!

src/backend/src/controllers/organizations.controller.ts Outdated Show resolved Hide resolved
src/backend/src/services/organizations.services.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@caiodasilva2005 caiodasilva2005 left a comment

Choose a reason for hiding this comment

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

LGTM!

@caiodasilva2005 caiodasilva2005 merged commit b2bab20 into feature/homepage-redesign Sep 17, 2024
4 checks passed
@caiodasilva2005 caiodasilva2005 deleted the #2764-Create-SetLogo-Endpoint branch September 17, 2024 16:07
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.

3 participants