Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿš€ (#294)

* ๐Ÿš€

* ๐Ÿš€

authored by

Thibault Le Ouay and committed by
GitHub
6d9e9add b2d9ba7d

+28 -13
+20 -8
apps/api/README.md
··· 1 - This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 1 + This is a [Next.js](https://nextjs.org/) project bootstrapped with 2 + [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 3 3 4 ## Getting Started 4 5 ··· 12 13 pnpm dev 13 14 ``` 14 15 15 - Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 16 + Open [http://localhost:3000](http://localhost:3000) with your browser to see the 17 + result. 16 18 17 - You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 19 + You can start editing the page by modifying `app/page.tsx`. The page 20 + auto-updates as you edit the file. 18 21 19 - This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 + This project uses 23 + [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to 24 + automatically optimize and load Inter, a custom Google Font. 20 25 21 26 ## Learn More 22 27 23 28 To learn more about Next.js, take a look at the following resources: 24 29 25 - - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 30 + - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js 31 + features and API. 26 32 - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 27 33 28 - You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 34 + You can check out 35 + [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your 36 + feedback and contributions are welcome! 29 37 30 38 ## Deploy on Vercel 31 39 32 - The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 40 + The easiest way to deploy your Next.js app is to use the 41 + [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) 42 + from the creators of Next.js. 33 43 34 - Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 44 + Check out our 45 + [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more 46 + details.
+5 -5
apps/api/src/app/layout.tsx
··· 1 1 export const metadata = { 2 - title: 'Next.js', 3 - description: 'Generated by Next.js', 4 - } 2 + title: "Next.js", 3 + description: "Generated by Next.js", 4 + }; 5 5 6 6 export default function RootLayout({ 7 7 children, 8 8 }: { 9 - children: React.ReactNode 9 + children: React.ReactNode; 10 10 }) { 11 11 return ( 12 12 <html lang="en"> 13 13 <body>{children}</body> 14 14 </html> 15 - ) 15 + ); 16 16 }
+3
apps/web/src/middleware.ts
··· 84 84 auth.userId && 85 85 (req.nextUrl.pathname === "/app" || req.nextUrl.pathname === "/app/") 86 86 ) { 87 + console.log('>>> Redirecting to "/app/workspace"'); 87 88 // improve on sign-up if the webhook has not been triggered yet 88 89 const userQuery = db 89 90 .select() ··· 96 97 .innerJoin(userQuery, eq(userQuery.id, usersToWorkspaces.userId)) 97 98 .all(); 98 99 if (result.length > 0) { 100 + console.log(">>> User has workspace"); 99 101 const currentWorkspace = await db 100 102 .select() 101 103 .from(workspace) ··· 106 108 `/app/${currentWorkspace.slug}/monitors`, 107 109 req.url, 108 110 ); 111 + console.log(`>>> Redirecting to ${orgSelection}`); 109 112 return NextResponse.redirect(orgSelection); 110 113 } 111 114 } else {