diff --git a/server/api/gitee.ts b/server/api/gitee.ts index df76340..13804ec 100644 --- a/server/api/gitee.ts +++ b/server/api/gitee.ts @@ -9,7 +9,7 @@ async function oauth(code: string) { code: code, client_id: GITEE_OAUTH_CLIENT_ID, client_secret: GITEE_OAUTH_CLIENT_SECRET, - redirect_uri: 'https://gitako.now.sh/redirect/', + redirect_uri: 'https://gitako.enix.one/redirect/', }) const res = await fetch('https://gitee.com/oauth/token?' + params.toString(), { diff --git a/src/manifest.json b/src/manifest.json index 7448eaa..4d292ad 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -11,7 +11,7 @@ "contextMenus", "activeTab", "*://*.github.com/*", - "*://gitako.now.sh/*", + "*://gitako.enix.one/*", "*://*.sentry.io/*" ], "optional_permissions": ["http://*/*", "https://*/*"], diff --git a/src/platforms/GitHub/API.ts b/src/platforms/GitHub/API.ts index d6c1d7c..ffa2911 100644 --- a/src/platforms/GitHub/API.ts +++ b/src/platforms/GitHub/API.ts @@ -171,7 +171,7 @@ export async function getBlobData( export async function OAuth(code: string): Promise { try { - const endpoint = `https://gitako.now.sh/oauth/github?` + const endpoint = `https://gitako.enix.one/oauth/github?` const res = await fetch(endpoint + new URLSearchParams({ code }).toString(), { method: 'post', }) diff --git a/src/platforms/Gitea/API.ts b/src/platforms/Gitea/API.ts index c566d33..d86a1ca 100644 --- a/src/platforms/Gitea/API.ts +++ b/src/platforms/Gitea/API.ts @@ -93,11 +93,11 @@ export async function getBlobData( } export async function OAuth(code: string): Promise { - const endpoint = `https://gitako.now.sh/oauth/gitea?` + const endpoint = `https://gitako.enix.one/oauth/gitea?` const res = await fetch(endpoint + new URLSearchParams({ code }).toString(), { method: 'post', }) - + if (res.ok) { const body = await res.json() const accessToken = body?.accessToken diff --git a/src/platforms/Gitee/API.ts b/src/platforms/Gitee/API.ts index ac9d030..a9921e7 100644 --- a/src/platforms/Gitee/API.ts +++ b/src/platforms/Gitee/API.ts @@ -89,7 +89,7 @@ export async function getBlobData( } export async function OAuth(code: string): Promise { - const endpoint = 'https://gitako.now.sh/oauth/gitee?' + const endpoint = 'https://gitako.enix.one/oauth/gitee?' const res = await fetch(endpoint + new URLSearchParams({ code }).toString(), { method: 'post', }) diff --git a/src/platforms/Gitee/index.ts b/src/platforms/Gitee/index.ts index 66e519c..edd0872 100644 --- a/src/platforms/Gitee/index.ts +++ b/src/platforms/Gitee/index.ts @@ -167,7 +167,7 @@ export const Gitee: Platform = { scope: 'projects', response_type: 'code', redirect_uri: - 'https://gitako.now.sh/redirect/?' + + 'https://gitako.enix.one/redirect/?' + new URLSearchParams({ redirect: window.location.href }).toString(), }) return `https://gitee.com/oauth/authorize?` + params.toString()