Dax Raad 3 ماه پیش
والد
کامیت
d96d89bcb8
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      packages/console/app/src/routes/user-menu.tsx

+ 5 - 1
packages/console/app/src/routes/user-menu.tsx

@@ -3,6 +3,7 @@ import { getRequestEvent } from "solid-js/web"
 import { useAuthSession } from "~/context/auth.session"
 import { useAuthSession } from "~/context/auth.session"
 import { Dropdown } from "~/component/dropdown"
 import { Dropdown } from "~/component/dropdown"
 import "./user-menu.css"
 import "./user-menu.css"
+import { getResponseHeaders } from "@solidjs/start/http"
 
 
 const logout = action(async () => {
 const logout = action(async () => {
   "use server"
   "use server"
@@ -17,7 +18,10 @@ const logout = action(async () => {
       event!.locals.actor = undefined
       event!.locals.actor = undefined
       return val
       return val
     })
     })
-  throw redirect("/zen")
+  throw redirect("/zen", {
+    status: 302,
+    headers: getResponseHeaders(),
+  })
 })
 })
 
 
 export function UserMenu(props: { email: string | null | undefined }) {
 export function UserMenu(props: { email: string | null | undefined }) {