Fix database functions regarding ch_bans since it's a special case
parent
57410dc969
commit
a882285bac
|
@ -30,7 +30,6 @@ async function addUser(name: string, password: string){
|
||||||
await query('INSERT INTO user_meta (username, title, about, live) VALUES ('+raw.escape(name)+',\'\',\'\',false)');
|
await query('INSERT INTO user_meta (username, title, about, live) VALUES ('+raw.escape(name)+',\'\',\'\',false)');
|
||||||
await query('INSERT INTO chat_integration (username, irc, xmpp, twitch, discord) VALUES ('+raw.escape(name)+',\'\',\'\',\'\',\'\')');
|
await query('INSERT INTO chat_integration (username, irc, xmpp, twitch, discord) VALUES ('+raw.escape(name)+',\'\',\'\',\'\',\'\')');
|
||||||
await query('INSERT INTO twitch_mirror (username) VALUES ('+raw.escape(name)+')');
|
await query('INSERT INTO twitch_mirror (username) VALUES ('+raw.escape(name)+')');
|
||||||
await query('INSERT INTO ch_bans(channel) VALUES ('+raw.escape(name)+')');
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +40,7 @@ async function rmUser(name: string){
|
||||||
await query('delete from user_meta where username='+raw.escape(name)+' limit 1');
|
await query('delete from user_meta where username='+raw.escape(name)+' limit 1');
|
||||||
await query('delete from chat_integration where username='+raw.escape(name)+' limit 1');
|
await query('delete from chat_integration where username='+raw.escape(name)+' limit 1');
|
||||||
await query('delete from twitch_mirror where username='+raw.escape(name)+' limit 1');
|
await query('delete from twitch_mirror where username='+raw.escape(name)+' limit 1');
|
||||||
await query('delete from ch_bans where username='+raw.escape(name)+' limit 1');
|
await query('delete from ch_bans where channel='+raw.escape(name));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue