Skip to content

Commit f39e4ca

Browse files
Merge pull request #19 from nauhil/develop
Remove .toLowerCase() of user traits service
2 parents 56002b4 + 8e49015 commit f39e4ca

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/services/user-traits.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class UserTraitsService {
4949
},
5050
}],
5151
};
52-
// FIXME: Remove the .toLowerCase() when the API is fixed to ignore the case in the route params
53-
const res = await this.private.api.postJson(`/members/${handle.toLowerCase()}/traits`, body);
52+
53+
const res = await this.private.api.postJson(`/members/${handle}/traits`, body);
5454
return getApiResponsePayloadV3(res);
5555
}
5656

@@ -71,8 +71,8 @@ class UserTraitsService {
7171
},
7272
}],
7373
};
74-
// FIXME: Remove the .toLowerCase() when the API is fixed to ignore the case in the route params
75-
const res = await this.private.api.putJson(`/members/${handle.toLowerCase()}/traits`, body);
74+
75+
const res = await this.private.api.putJson(`/members/${handle}/traits`, body);
7676
return getApiResponsePayloadV3(res);
7777
}
7878

@@ -83,8 +83,7 @@ class UserTraitsService {
8383
* @return {Promise} Resolves to the member traits.
8484
*/
8585
async deleteUserTrait(handle, traitId) {
86-
// FIXME: Remove the .toLowerCase() when the API is fixed to ignore the case in the route params
87-
const res = await this.private.api.delete(`/members/${handle.toLowerCase()}/traits?traitIds=${traitId}`);
86+
const res = await this.private.api.delete(`/members/${handle}/traits?traitIds=${traitId}`);
8887
return getApiResponsePayloadV3(res);
8988
}
9089
}

0 commit comments

Comments
 (0)