Skip to content

Commit

Permalink
Fix idempotency key validation
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Oct 23, 2024
1 parent 5d1730a commit 8086f4b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/src/util/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ export const nanoid = (e = 21) => {
return t
}

export const randomString = (length = 10) => nanoid(length)

// Matches the output of the randomString function, for validation purposes.
export const randomStringRegex = /^[0-9a-z]+$/
export const randomStringRegex = /^[0-9a-zA-Z]+$/
export const randomString = (length = 10) => nanoid(length)

export function genHash(str: string) {
// xmur3
Expand Down

0 comments on commit 8086f4b

Please sign in to comment.