Skip to content

Commit

Permalink
chore(backend): Make uploader user ID optional when uploading an orga…
Browse files Browse the repository at this point in the history
…nization logo (#4236)

Co-authored-by: Laura Beatris <[email protected]>
  • Loading branch information
izaaklauer and LauraBeatris authored Sep 27, 2024
1 parent faad51b commit 748c0ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-bikes-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/backend": patch
---

Update `uploaderUserId` parameter on `updateOrganizationLogo` to be optional.
6 changes: 4 additions & 2 deletions packages/backend/src/api/endpoints/OrganizationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type UpdateParams = {

type UpdateLogoParams = {
file: Blob | File;
uploaderUserId: string;
uploaderUserId?: string;
};

type UpdateMetadataParams = MetadataParams;
Expand Down Expand Up @@ -168,7 +168,9 @@ export class OrganizationAPI extends AbstractAPI {

const formData = new runtime.FormData();
formData.append('file', params?.file);
formData.append('uploader_user_id', params?.uploaderUserId);
if (params?.uploaderUserId) {
formData.append('uploader_user_id', params?.uploaderUserId);
}

return this.request<Organization>({
method: 'PUT',
Expand Down

0 comments on commit 748c0ba

Please sign in to comment.