Replace into guild_active from homepage
Allow user to change their mind about auto-create by redoing oauth flow.
This commit is contained in:
parent
88a232fb4a
commit
e00ce22aad
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ as.router.get("/oauth", defineEventHandler(async event => {
|
||||||
// Set auto-create for the guild
|
// Set auto-create for the guild
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (managedGuilds.includes(parsedQuery.data.guild_id)) {
|
if (managedGuilds.includes(parsedQuery.data.guild_id)) {
|
||||||
db.prepare("INSERT OR IGNORE INTO guild_active (guild_id, autocreate) VALUES (?, ?)").run(parsedQuery.data.guild_id, +!session.data.selfService)
|
db.prepare("REPLACE INTO guild_active (guild_id, autocreate) VALUES (?, ?)").run(parsedQuery.data.guild_id, +!session.data.selfService)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedQuery.data.guild_id) {
|
if (parsedQuery.data.guild_id) {
|
||||||
|
|
Loading…
Reference in a new issue