mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-11-23 16:51:06 +01:00
Compare commits
1 commit
8eca9f1ec5
...
164bc09cdd
Author | SHA1 | Date | |
---|---|---|---|
164bc09cdd |
2 changed files with 0 additions and 16 deletions
|
@ -50,20 +50,6 @@ export async function GET(context: APIContext): Promise<Response> {
|
|||
sessionCookie.value,
|
||||
sessionCookie.attributes
|
||||
);
|
||||
|
||||
await context.locals.runtime.env.DB.prepare(
|
||||
"UPDATE user SET username = ?2, avatar = ?3, access_token = ?4,access_token_expiration = ?5, refresh_token = ?6 WHERE discord_id = ?1"
|
||||
)
|
||||
.bind(
|
||||
discordUser.id,
|
||||
discordUser.username,
|
||||
discordUser.avatar,
|
||||
tokens.accessToken,
|
||||
tokens.accessTokenExpiresAt.getTime(),
|
||||
tokens.refreshToken
|
||||
)
|
||||
.first<UserRow>();
|
||||
|
||||
return context.redirect("/dashboard");
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@ export async function GET(context: APIContext): Promise<Response> {
|
|||
scopes: ["identify", "guilds"],
|
||||
});
|
||||
|
||||
console.log("login");
|
||||
|
||||
context.cookies.set("discord_oauth_state", state, {
|
||||
path: "/",
|
||||
secure: import.meta.env.PROD,
|
||||
|
|
Loading…
Reference in a new issue