Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/services/user-traits.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}
}
Expand Down