feat: generate api key

This commit is contained in:
karishmas6
2024-09-24 23:50:55 +05:30
parent a2e4c2dde0
commit f68c61c0ec

6
server/src/api/index.ts Normal file
View File

@@ -0,0 +1,6 @@
const genAPIKey = () => {
//create a base-36 string that contains 30 chars in a-z,0-9
return [...Array(30)]
.map((e) => ((Math.random() * 36) | 0).toString(36))
.join('');
};