chore: get rid of randomstring

This commit is contained in:
Markus
2026-08-04 15:21:32 +03:00
parent e29fccf1f6
commit 8f795bc720
3 changed files with 2 additions and 27 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
const randomstring = require('randomstring')
const crypto = require('crypto')
/**
* @typedef {'topicAccepted' | 'topicRejected' | 'customerReviewLink'} MessageType
@@ -61,7 +61,7 @@ const pipe =
fns.reduce((v, fn) => fn(v), value)
const getRandomId = () => {
return 'a' + randomstring.generate(16)
return 'a' + crypto.randomBytes(8).toString('hex')
}
const isDevelopmentEnvironment = () => process.env.NODE_ENV === 'development'