id gen
This commit is contained in:
		@@ -1,9 +1,5 @@
 | 
				
			|||||||
const {
 | 
					const {Client} = require("pg");
 | 
				
			||||||
    Client
 | 
					const {postgresSQL} = require("./keys");
 | 
				
			||||||
} = require("pg");
 | 
					 | 
				
			||||||
const {
 | 
					 | 
				
			||||||
    postgresSQL
 | 
					 | 
				
			||||||
} = require("./keys")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const client = new Client(postgresSQL);
 | 
					const client = new Client(postgresSQL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -534,6 +534,18 @@ function generate_group_id() {
 | 
				
			|||||||
    return output;
 | 
					    return output;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//Random ID generate
 | 
				
			||||||
 | 
					function genID(length) {
 | 
				
			||||||
 | 
					    var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
 | 
				
			||||||
 | 
					    var output = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (let i = 0; i < length; i++) {
 | 
				
			||||||
 | 
					        output += possible.charAt(Math.floor(Math.random() * possible.length));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return output;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//item_id generieren
 | 
					//item_id generieren
 | 
				
			||||||
function generate_item_id() {
 | 
					function generate_item_id() {
 | 
				
			||||||
    var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
 | 
					    var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user