mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-12-22 01:32:17 +00:00
Add a way to generate invites from the command line. Add database migration script.
This commit is contained in:
@@ -98,9 +98,9 @@ async function getConfig(username: string, all?: boolean): Promise<object>{
|
||||
return t;
|
||||
}
|
||||
|
||||
async function genInvite(user: string): Promise<string>{
|
||||
async function genInvite(): Promise<string>{
|
||||
var invitecode: string = base64id.generateId();
|
||||
await db.query('INSERT INTO invites (code) VALUES ('+invitecode+')');
|
||||
await db.query('INSERT INTO invites (code) VALUES (\"'+invitecode+'\")');
|
||||
return invitecode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user