Skip to content

Commit

Permalink
feat(backend): Add Delete user profile image (#3991)
Browse files Browse the repository at this point in the history
  • Loading branch information
octoper authored Aug 21, 2024
1 parent e81d9a5 commit ed7baa0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-teachers-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/backend": minor
---

Add `deleteUserProfileImage` method to the UserAPI class.
8 changes: 8 additions & 0 deletions packages/backend/src/api/endpoints/UserApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,12 @@ export class UserAPI extends AbstractAPI {
path: joinPaths(basePath, userId, 'unlock'),
});
}

public async deleteUserProfileImage(userId: string) {
this.requireId(userId);
return this.request<User>({
method: 'DELETE',
path: joinPaths(basePath, userId, 'profile_image'),
});
}
}

0 comments on commit ed7baa0

Please sign in to comment.