mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
chore: update gitako service host
This commit is contained in:
parent
d9659e26b2
commit
59ee3e4375
6 changed files with 7 additions and 7 deletions
|
|
@ -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(), {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"contextMenus",
|
||||
"activeTab",
|
||||
"*://*.github.com/*",
|
||||
"*://gitako.now.sh/*",
|
||||
"*://gitako.enix.one/*",
|
||||
"*://*.sentry.io/*"
|
||||
],
|
||||
"optional_permissions": ["http://*/*", "https://*/*"],
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue