Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
1cc86f9e
authored
Jun 26, 2025
by
dreamer6680
Committed by
GitHub
Jun 26, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix loginout don`t delete session (#5088)
Co-authored-by: dreamer6680 <146868355@qq.com>
parent
25c00cde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
projects/app/src/pages/api/support/user/account/loginout.ts
+4
-0
No files found.
projects/app/src/pages/api/support/user/account/loginout.ts
View file @
1cc86f9e
import
type
{
NextApiRequest
,
NextApiResponse
}
from
'next'
;
import
type
{
NextApiRequest
,
NextApiResponse
}
from
'next'
;
import
{
clearCookie
}
from
'@fastgpt/service/support/permission/controller'
;
import
{
clearCookie
}
from
'@fastgpt/service/support/permission/controller'
;
import
{
NextAPI
}
from
'@/service/middleware/entry'
;
import
{
NextAPI
}
from
'@/service/middleware/entry'
;
import
{
authCert
}
from
'@fastgpt/service/support/permission/auth/common'
;
import
{
delUserAllSession
}
from
'@fastgpt/service/support/user/session'
;
async
function
handler
(
req
:
NextApiRequest
,
res
:
NextApiResponse
<
any
>
)
{
async
function
handler
(
req
:
NextApiRequest
,
res
:
NextApiResponse
<
any
>
)
{
const
{
userId
}
=
await
authCert
({
req
,
authToken
:
true
});
await
delUserAllSession
(
userId
);
clearCookie
(
res
);
clearCookie
(
res
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment