diff --git a/.changeset/tricky-bikes-move.md b/.changeset/tricky-bikes-move.md new file mode 100644 index 0000000000..ed3a037e9e --- /dev/null +++ b/.changeset/tricky-bikes-move.md @@ -0,0 +1,5 @@ +--- +"@clerk/backend": patch +--- + +Update `uploaderUserId` parameter on `updateOrganizationLogo` to be optional. diff --git a/packages/backend/src/api/endpoints/OrganizationApi.ts b/packages/backend/src/api/endpoints/OrganizationApi.ts index b86e2cb238..3eac436061 100644 --- a/packages/backend/src/api/endpoints/OrganizationApi.ts +++ b/packages/backend/src/api/endpoints/OrganizationApi.ts @@ -47,7 +47,7 @@ type UpdateParams = { type UpdateLogoParams = { file: Blob | File; - uploaderUserId: string; + uploaderUserId?: string; }; type UpdateMetadataParams = MetadataParams; @@ -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({ method: 'PUT',