From 8e490151ad25ca2eebbb9beb7f3d6ca7cc3648dd Mon Sep 17 00:00:00 2001 From: Huan Li Date: Tue, 7 Aug 2018 11:25:43 +0800 Subject: [PATCH] Remove .toLowerCase() of user traits service --- src/services/user-traits.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/services/user-traits.js b/src/services/user-traits.js index eaf8c262..2150080e 100644 --- a/src/services/user-traits.js +++ b/src/services/user-traits.js @@ -49,8 +49,8 @@ class UserTraitsService { }, }], }; - // FIXME: Remove the .toLowerCase() when the API is fixed to ignore the case in the route params - const res = await this.private.api.postJson(`/members/${handle.toLowerCase()}/traits`, body); + + const res = await this.private.api.postJson(`/members/${handle}/traits`, body); return getApiResponsePayloadV3(res); } @@ -71,8 +71,8 @@ class UserTraitsService { }, }], }; - // FIXME: Remove the .toLowerCase() when the API is fixed to ignore the case in the route params - const res = await this.private.api.putJson(`/members/${handle.toLowerCase()}/traits`, body); + + const res = await this.private.api.putJson(`/members/${handle}/traits`, body); return getApiResponsePayloadV3(res); } @@ -83,8 +83,7 @@ class UserTraitsService { * @return {Promise} Resolves to the member traits. */ async deleteUserTrait(handle, traitId) { - // FIXME: Remove the .toLowerCase() when the API is fixed to ignore the case in the route params - const res = await this.private.api.delete(`/members/${handle.toLowerCase()}/traits?traitIds=${traitId}`); + const res = await this.private.api.delete(`/members/${handle}/traits?traitIds=${traitId}`); return getApiResponsePayloadV3(res); } }