fix 修复 关闭sse功能 登出还是会发送sse关闭请求导致报错问题

This commit is contained in:
疯狂的狮子Li 2024-11-15 09:56:27 +08:00
parent 2ef0cf5bd5
commit 5f582c09ba

View File

@ -51,10 +51,12 @@ export function register(data: any) {
* *
*/ */
export function logout() { export function logout() {
request({ if (import.meta.env.VITE_APP_SSE === 'true') {
url: '/resource/sse/close', request({
method: 'get' url: '/resource/sse/close',
}); method: 'get'
});
}
return request({ return request({
url: '/auth/logout', url: '/auth/logout',
method: 'post' method: 'post'