Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 10ebf036
authored
Feb 16, 2025
by
Netfan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: auth api definition
1 parent
cd258fbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
playground/src/api/core/auth.ts
playground/src/api/core/auth.ts
View file @
10ebf03
...
@@ -22,23 +22,29 @@ export namespace AuthApi {
...
@@ -22,23 +22,29 @@ export namespace AuthApi {
* 登录
* 登录
*/
*/
export
async
function
loginApi
(
data
:
AuthApi
.
LoginParams
)
{
export
async
function
loginApi
(
data
:
AuthApi
.
LoginParams
)
{
return
requestClient
.
post
<
AuthApi
.
LoginResult
>
(
'/auth/login'
,
data
);
return
requestClient
.
post
<
AuthApi
.
LoginResult
>
(
'/auth/login'
,
data
,
{
withCredentials
:
true
,
});
}
}
/**
/**
* 刷新accessToken
* 刷新accessToken
*/
*/
export
async
function
refreshTokenApi
()
{
export
async
function
refreshTokenApi
()
{
return
baseRequestClient
.
post
<
AuthApi
.
RefreshTokenResult
>
(
'/auth/refresh'
,
{
return
baseRequestClient
.
post
<
AuthApi
.
RefreshTokenResult
>
(
withCredentials
:
true
,
'/auth/refresh'
,
});
null
,
{
withCredentials
:
true
,
},
);
}
}
/**
/**
* 退出登录
* 退出登录
*/
*/
export
async
function
logoutApi
()
{
export
async
function
logoutApi
()
{
return
baseRequestClient
.
post
(
'/auth/logout'
,
{
return
baseRequestClient
.
post
(
'/auth/logout'
,
null
,
{
withCredentials
:
true
,
withCredentials
:
true
,
});
});
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment