From ed7baa0488df0ee4c48add2aac934ffb47e4a6d2 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Wed, 21 Aug 2024 12:45:02 +0300 Subject: [PATCH] feat(backend): Add Delete user profile image (#3991) --- .changeset/few-teachers-brake.md | 5 +++++ packages/backend/src/api/endpoints/UserApi.ts | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 .changeset/few-teachers-brake.md diff --git a/.changeset/few-teachers-brake.md b/.changeset/few-teachers-brake.md new file mode 100644 index 0000000000..f18743a28a --- /dev/null +++ b/.changeset/few-teachers-brake.md @@ -0,0 +1,5 @@ +--- +"@clerk/backend": minor +--- + +Add `deleteUserProfileImage` method to the UserAPI class. diff --git a/packages/backend/src/api/endpoints/UserApi.ts b/packages/backend/src/api/endpoints/UserApi.ts index 028793682d..20efe2f191 100644 --- a/packages/backend/src/api/endpoints/UserApi.ts +++ b/packages/backend/src/api/endpoints/UserApi.ts @@ -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({ + method: 'DELETE', + path: joinPaths(basePath, userId, 'profile_image'), + }); + } }