chore: update gitako service host

This commit is contained in:
EnixCoda 2022-04-25 22:32:32 +08:00
parent d9659e26b2
commit 59ee3e4375
6 changed files with 7 additions and 7 deletions

View file

@ -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(), {

View file

@ -11,7 +11,7 @@
"contextMenus",
"activeTab",
"*://*.github.com/*",
"*://gitako.now.sh/*",
"*://gitako.enix.one/*",
"*://*.sentry.io/*"
],
"optional_permissions": ["http://*/*", "https://*/*"],

View file

@ -171,7 +171,7 @@ export async function getBlobData(
export async function OAuth(code: string): Promise<string | null> {
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',
})

View file

@ -93,11 +93,11 @@ export async function getBlobData(
}
export async function OAuth(code: string): Promise<string | null> {
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

View file

@ -89,7 +89,7 @@ export async function getBlobData(
}
export async function OAuth(code: string): Promise<string | null> {
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',
})

View file

@ -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()