feat(all): add organisation, api updates with organisation check

Now calling run endpoints with GET, POST will check against the API key, whether there is org_id or not, if the operation workflow doesnt match with the user org or user id, will return with workflow not found, run not found
This commit is contained in:
BennyKok
2024-01-01 23:13:01 +08:00
parent 75776e6d8f
commit c66de45522
19 changed files with 907 additions and 59 deletions
+10 -3
View File
@@ -1,8 +1,8 @@
import "./globals.css";
import { NavbarRight } from "@/components/NavbarRight";
import { NavbarMenu } from "@/components/NavbarMenu";
import { Button } from "@/components/ui/button";
import { TooltipProvider } from "@/components/ui/tooltip";
import { ClerkProvider, UserButton } from "@clerk/nextjs";
import { ClerkProvider, OrganizationSwitcher, UserButton } from "@clerk/nextjs";
import { Github } from "lucide-react";
import type { Metadata } from "next";
import meta from "next-gen/config";
@@ -54,9 +54,16 @@ export default function RootLayout({
>
{meta.name}
</a>
<NavbarRight />
<OrganizationSwitcher
appearance={{
elements: {
rootBox: "flex items-center justify-center",
},
}}
/>
</div>
<div className="flex flex-row items-center gap-2">
<NavbarMenu />
<Button
asChild
variant="link"