diff --git a/backend/src/main/java/com/kyyros/config/SecurityConfig.java b/backend/src/main/java/com/kyyros/config/SecurityConfig.java index e757622..62d1858 100644 --- a/backend/src/main/java/com/kyyros/config/SecurityConfig.java +++ b/backend/src/main/java/com/kyyros/config/SecurityConfig.java @@ -64,7 +64,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); config.setAllowedOrigins(List.of("http://localhost:3000")); // TODO: Add Vercel URL in production - config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS")); + config.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")); config.setAllowedHeaders(List.of("*")); config.setAllowCredentials(true); diff --git a/frontend/src/app/upload/layout.tsx b/frontend/src/app/upload/layout.tsx new file mode 100644 index 0000000..d7a4b0d --- /dev/null +++ b/frontend/src/app/upload/layout.tsx @@ -0,0 +1,9 @@ +import { ReactNode } from 'react'; + +export default function UploadLayout({ children }: { children: ReactNode }) { + return ( +
+
{children}
+
+ ); +} diff --git a/frontend/src/app/upload/page.tsx b/frontend/src/app/upload/page.tsx new file mode 100644 index 0000000..177cc16 --- /dev/null +++ b/frontend/src/app/upload/page.tsx @@ -0,0 +1,19 @@ +import { redirect } from 'next/navigation'; + +import { createClient } from '@/lib/supabase/server'; +import UploadForm from '@/components/upload/upload-form'; + +export default async function UploadPage() { + const supabase = await createClient(); + const { + data: { user }, + } = await supabase.auth.getUser(); + + if (!user) redirect('/login'); + + return ( +
+ +
+ ); +} diff --git a/frontend/src/components/ui/progress.tsx b/frontend/src/components/ui/progress.tsx new file mode 100644 index 0000000..584011b --- /dev/null +++ b/frontend/src/components/ui/progress.tsx @@ -0,0 +1,31 @@ +"use client" + +import * as React from "react" +import { Progress as ProgressPrimitive } from "radix-ui" + +import { cn } from "@/lib/utils" + +function Progress({ + className, + value, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { Progress } diff --git a/frontend/src/components/ui/textarea.tsx b/frontend/src/components/ui/textarea.tsx new file mode 100644 index 0000000..04d27f7 --- /dev/null +++ b/frontend/src/components/ui/textarea.tsx @@ -0,0 +1,18 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { + return ( +