This commit is contained in:
parent
c90b7eba69
commit
4b9f4489ca
|
|
@ -120,14 +120,18 @@ export default async function Login({
|
|||
// Since we used `.limit(1)`, we can safely use `.single()` now
|
||||
const workspace = homeWorkspace[0]; // Use the first (and only) row
|
||||
|
||||
if (!homeWorkspace) {
|
||||
//const fallbackMessage = String(t("login.unexpectedError"))
|
||||
throw new Error(
|
||||
homeWorkspaceError?.message || "An unexpected error occurred"
|
||||
// homeWorkspaceError?.message || t("login.unexpectedError")
|
||||
)
|
||||
if (!homeWorkspace || homeWorkspace.length === 0) {
|
||||
throw new Error(homeWorkspaceError?.message || "No home workspace found for this user.");
|
||||
}
|
||||
|
||||
// if (!homeWorkspace) {
|
||||
// //const fallbackMessage = String(t("login.unexpectedError"))
|
||||
// throw new Error(
|
||||
// homeWorkspaceError?.message || "An unexpected error occurred"
|
||||
// // homeWorkspaceError?.message || t("login.unexpectedError")
|
||||
// )
|
||||
// }
|
||||
|
||||
return redirect(`/${localeString}/${workspace.id}/chat`)
|
||||
//return redirect(`/${localeString}/${homeWorkspace.id}/chat`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue