Skip to content

Commit

Permalink
add crypto import to utils file
Browse files Browse the repository at this point in the history
  • Loading branch information
fahreddinozcan committed Nov 8, 2024
1 parent c43230d commit 710e378
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import crypto from "crypto"

const NANOID_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_";
const NANOID_LENGTH = 21;

Expand Down Expand Up @@ -28,7 +30,7 @@ export function decodeBase64(base64: string) {
// this error should never happen essentially. It's only a failsafe
console.warn(
`Upstash Qstash: Failed while decoding base64 "${base64}".` +
` Decoding with atob and returning it instead. ${error}`
` Decoding with atob and returning it instead. ${error}`
);
return atob(base64);
}
Expand Down

0 comments on commit 710e378

Please sign in to comment.