Skip to content

Commit fb0c7c5

Browse files
committed
fix double wrap reponse of guest session handler
1 parent 5be12f8 commit fb0c7c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/app/api/auth/[...all]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { toNextJsHandler } from 'better-auth/next-js'
22
import { type NextRequest, NextResponse } from 'next/server'
33
import { auth } from '@/lib/auth'
4-
import { createAnonymousGetSessionResponse, ensureAnonymousUserExists } from '@/lib/auth/anonymous'
4+
import { createAnonymousSession, ensureAnonymousUserExists } from '@/lib/auth/anonymous'
55
import { isAuthDisabled } from '@/lib/core/config/feature-flags'
66
import { withRouteHandler } from '@/lib/core/utils/with-route-handler'
77

@@ -24,7 +24,7 @@ export const GET = withRouteHandler(async (request: NextRequest) => {
2424

2525
if (path === 'get-session' && isAuthDisabled) {
2626
await ensureAnonymousUserExists()
27-
return NextResponse.json(createAnonymousGetSessionResponse())
27+
return NextResponse.json(createAnonymousSession())
2828
}
2929

3030
return betterAuthGET(request)

0 commit comments

Comments
 (0)