Skip to content

Commit 772d782

Browse files
feat: send sbx/new to the terminal instead of filesystem (#431)
sends the sbx/new to the terminal instead of filesystem
1 parent 784ea57 commit 772d782

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/app/sbx/new/route.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,19 @@ export const GET = async (req: NextRequest) => {
3030
}
3131

3232
const sbx = await Sandbox.create('base', {
33+
apiUrl: process.env.NEXT_PUBLIC_INFRA_API_URL,
3334
domain: process.env.NEXT_PUBLIC_E2B_DOMAIN,
3435
apiHeaders: {
3536
...authHeaders(authContext.accessToken, team.id),
3637
},
3738
})
3839

39-
const filesystemUrl = PROTECTED_URLS.SANDBOX_FILESYSTEM(
40+
const terminalUrl = PROTECTED_URLS.SANDBOX_TERMINAL(
4041
team.slug,
4142
sbx.sandboxId
4243
)
4344

44-
return NextResponse.redirect(new URL(filesystemUrl, req.url))
45+
return NextResponse.redirect(new URL(terminalUrl, req.url))
4546
} catch (error) {
4647
l.warn(
4748
{

0 commit comments

Comments
 (0)