feat: generate api key
This commit is contained in:
6
server/src/api/index.ts
Normal file
6
server/src/api/index.ts
Normal 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('');
|
||||
};
|
||||
Reference in New Issue
Block a user