✨ github oauth2 login / gitee oauth2 login
This commit is contained in:
18
src/api/oauth/gitee.ts
Normal file
18
src/api/oauth/gitee.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {service} from "@/utils/alova/service.ts";
|
||||
|
||||
/**
|
||||
* 获取Gitee登录链接
|
||||
*/
|
||||
export const getGiteeUrl = () => {
|
||||
return service.Get('/api/oauth/gitee/get_url',
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
},
|
||||
cacheFor: {
|
||||
mode: "restore",
|
||||
expire: 1000 * 60 * 60 * 24 * 30 // 30 days
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
18
src/api/oauth/github.ts
Normal file
18
src/api/oauth/github.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {service} from "@/utils/alova/service.ts";
|
||||
|
||||
/**
|
||||
* Get Github OAuth URL
|
||||
*/
|
||||
export const getGithubUrl = () => {
|
||||
return service.Get('/api/oauth/github/get_url',
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
},
|
||||
cacheFor: {
|
||||
mode: "restore",
|
||||
expire: 1000 * 60 * 60 * 24 * 30 // 30 days
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
@@ -48,15 +48,3 @@ export const closeWebsocket = (clientId: string) => {
|
||||
}
|
||||
);
|
||||
};
|
||||
export const sendSocketMessage = (clientId: string) => {
|
||||
return service.Get('/api/ws/send',
|
||||
{
|
||||
params: {
|
||||
client_id: clientId
|
||||
},
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user