From 5e129ea18c9533f54a21386496b709189e8794e2 Mon Sep 17 00:00:00 2001 From: Chuck MANCHUCK Reeves Date: Thu, 22 Aug 2024 17:14:40 -0400 Subject: [PATCH] fix: incorrect http method for updating users --- packages/users/__tests__/__dataSets__/put.ts | 2 +- packages/users/lib/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/users/__tests__/__dataSets__/put.ts b/packages/users/__tests__/__dataSets__/put.ts index 787e3342..8f11589e 100644 --- a/packages/users/__tests__/__dataSets__/put.ts +++ b/packages/users/__tests__/__dataSets__/put.ts @@ -8,7 +8,7 @@ delete updateUser.id; export default [ { label: 'update user', - requests: [[`/v1/users/${testUser.id}`, 'PUT', updateUser]], + requests: [[`/v1/users/${testUser.id}`, 'PATCH', updateUser]], responses: [ [ 200, diff --git a/packages/users/lib/user.ts b/packages/users/lib/user.ts index 61d6fb0c..2ddc5f91 100644 --- a/packages/users/lib/user.ts +++ b/packages/users/lib/user.ts @@ -181,7 +181,7 @@ export class Users extends Client { * @throws {Error} If there is an issue with the request or response, or if the user with the specified ID is not found. */ async updateUser(user: UserType): Promise { - const resp = await this.sendPutRequest( + const resp = await this.sendPatchRequest( `${this.config.apiHost}/v1/users/${user.id}`, userToAPI(user), );