diff --git a/src/pages/api/projects/create.ts b/src/pages/api/projects/create.ts index 00ad2ea2..5ad222b0 100644 --- a/src/pages/api/projects/create.ts +++ b/src/pages/api/projects/create.ts @@ -1,7 +1,7 @@ import ShortUniqueId from "short-unique-id"; import type { APIRoute } from "astro"; import { createClient } from "@supabase/supabase-js"; -import type { DeliverProjectItem } from "~/types"; +import type { SubmitProjectItem } from "~/types"; import { SMTPClient } from "emailjs"; export const prerender = false; @@ -37,7 +37,7 @@ export const POST: APIRoute = async ({ request }) => { ); } - const data: DeliverProjectItem = { + const data: SubmitProjectItem = { team_code: formData.get("team_code")?.toString().replace("#", "") ?? "", name: formData.get("name")?.toString() ?? "", description: formData.get("description")?.toString() ?? "", diff --git a/src/types.ts b/src/types.ts index 9eba7c28..d6943818 100644 --- a/src/types.ts +++ b/src/types.ts @@ -49,7 +49,7 @@ export interface JoinTeamItem { member_email: string; } -export interface DeliverProjectItem { +export interface SubmitProjectItem { team_code: string; name: string; description: string;