Skip to content

Commit b146d73

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
authored andcommitted
added test case and updated logic
1 parent 07785f4 commit b146d73

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

libs/url/builder.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ const customEncodeURIComponent = (str: string) => {
3939
return encodeURIComponent(segment);
4040
});
4141
return str.includes("?") ? `${encodedSegments.join("/")}?${str.split("?")[1]}` : encodedSegments.join("/");
42-
// return str.includes("?") ? `${encodeURI(parts)}?${str.split("?")[1]}` : encodeURI(parts);
4342
};
4443

4544
const encodeStringIfRequired = (str: string) => {
46-
console.log({str})
4745
return hasMoreThanAscii(str) ? customEncodeURIComponent(str) : str;
4846
}
4947

@@ -184,7 +182,6 @@ function getSignatureTimestamp(seconds: number): string {
184182
}
185183

186184
function getSignature(opts: any) {
187-
console.log({opts})
188185
if (!opts.privateKey || !opts.url || !opts.urlEndpoint) return "";
189186
var stringToSign = opts.url.replace(urlFormatter.addTrailingSlash(opts.urlEndpoint), "") + opts.expiryTimestamp;
190187
return crypto.createHmac("sha1", opts.privateKey).update(stringToSign).digest("hex");

0 commit comments

Comments
 (0)