Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

changes based on comments

ErikKaumk56b6e97ef83c
diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs
index 8dd3bfb73..c2af44e99 100644
--- a/apps/docs/next.config.mjs
+++ b/apps/docs/next.config.mjs
@@ -53,29 +53,6 @@ const nextConfig = {
config.cache.version = config.cache.version + delimiter + codeFilesHash
return config
},
- // async rewrites() {
- // return {
- // afterFiles: [
- // {
- // source: '/ingest/:path*',
- // destination: 'https://app.posthog.com/:path*',
- // // BEWARE: setting basePath will break the analytics proxy
- // },
- // { source: '/:path*', destination: '/_404/:path*' },
- // ]
- // }
-
- // },
- // async redirects() {
- // return [
- // {
- // source: '/',
- // destination: '/docs',
- // permanent: false,
- // basePath: false,
- // },
- // ]
- // },
}
export default withSearch(
diff --git a/apps/docs/src/app/(main)/api/get-user-info/route.ts b/apps/docs/src/app/(main)/api/get-user-info/route.ts
index 1b13a69d9..c12e231a3 100644
--- a/apps/docs/src/app/(main)/api/get-user-info/route.ts
+++ b/apps/docs/src/app/(main)/api/get-user-info/route.ts
@@ -8,8 +8,18 @@ const supabase = createClient(
process.env.SUPABASE_SERVICE_ROLE_KEY!,
)
-// TODO this needs some auth
export async function POST(request: Request) {
+
+ const { data, error } = await supabase.auth.getUser()
+ if (error) {
+ console.log(error)
+ return new Response(error.message, { status: 500 })
+ }
+ if (!data) {
+ return new Response('Not logged in', { status: 401 })
+ }
+
+
const { userIds } = await request.json() // Expecting an array of user IDs
const userPromises = userIds.map((userId: string) =>
diff --git a/apps/docs/src/app/(main)/api/layout.tsx b/apps/docs/src/app/(main)/api/layout.tsx
index a14e64fcd..f29e46d03 100644
--- a/apps/docs/src/app/(main)/api/layout.tsx
+++ b/apps/docs/src/app/(main)/api/layout.tsx
@@ -1,16 +1,18 @@
-export const metadata = {
- title: 'Next.js',
- description: 'Generated by Next.js',
-}
+import { Metadata } from 'next'
-export default function RootLayout({
- children,
-}: {
- children: React.ReactNode
-}) {
- return (
- <html lang="en">
- <body>{children}</body>
- </html>
- )
+export const metadata: Metadata = {
+ title: {
+ template: '%s - E2B',
+ default: 'E2B - Code Interpreting for AI apps',
+ },
+ description: 'Open-source secure sandboxes for AI code execution',
+ twitter: {
+ title: 'E2B - Code Interpreting for AI apps',
+ description: 'Open-source secure sandboxes for AI code execution',
+ },
+ openGraph: {
+ title: 'E2B - Code Interpreting for AI apps',
+ description: 'Open-source secure sandboxes for AI code execution',
+ },
}
+
diff --git a/apps/docs/src/app/(main)/sign-in/layout.tsx b/apps/docs/src/app/(main)/sign-in/layout.tsx
index a14e64fcd..a7edd6dfb 100644
--- a/apps/docs/src/app/(main)/sign-in/layout.tsx
+++ b/apps/docs/src/app/(main)/sign-in/layout.tsx
@@ -1,6 +1,19 @@
-export const metadata = {
- title: 'Next.js',
- description: 'Generated by Next.js',
+import { Metadata } from 'next'
+
+export const metadata: Metadata = {
+ title: {
+ template: '%s - E2B',
+ default: 'E2B - Code Interpreting for AI apps',
+ },
+ description: 'Open-source secure sandboxes for AI code execution',
+ twitter: {
+ title: 'E2B - Code Interpreting for AI apps',
+ description: 'Open-source secure sandboxes for AI code execution',
+ },
+ openGraph: {
+ title: 'E2B - Code Interpreting for AI apps',
+ description: 'Open-source secure sandboxes for AI code execution',
+ },
}
export default function RootLayout({