diff --git a/functions/github/install/[installation_id]/[code].js b/functions/github/install/[installation_id]/[code].js index 624cd25..9412cb8 100644 --- a/functions/github/install/[installation_id]/[code].js +++ b/functions/github/install/[installation_id]/[code].js @@ -25,12 +25,9 @@ export async function onRequestGet(context) { client_id: env.GITHUB_APP_CLIENT_ID, client_secret: env.GITHUB_APP_CLIENT_SECRET }).toString() - const resp = await fetch(url, { method }).catch(err => { + const data = await fetch(url, { method }).catch(err => { throw Error(err) }) - console.log('resp', resp) - const data = await resp.json() - console.log('data', data) const info = await env.d1db.prepare('INSERT INTO integration_github (installation_id, memberEmail, access_key) VALUES (?1, ?2, ?3)') .bind(token, session.memberEmail, data.access_token) .run() diff --git a/src/pages/Login.vue b/src/pages/Login.vue index 1c89ae0..831fb8a 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -26,9 +26,8 @@ const isPasswordVisible = ref(false) const login = async () => { if (state.email && state.password) { - const resp = await axios.get(`/login/${state.email}/${SHA1(state.password)}`) + const data = await axios.get(`/login/${state.email}/${SHA1(state.password)}`) .catch(console.log) - const data = await resp.json() localStorage.setItem('/member/email', state.email) localStorage.setItem('/session/token', data.token) router.push('/dashboard')