Skip to content

Commit 8e49015

Browse files
author
Huan Li
committed
Remove .toLowerCase() of user traits service
1 parent 56002b4 commit 8e49015

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/services/user-traits.js

Lines changed: 5 additions & 6 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy