From f73e4d823ed676feb929bfdf302e917d3ea27dd5 Mon Sep 17 00:00:00 2001 From: FTCHD Date: Sat, 14 Sep 2024 21:21:15 +0300 Subject: [PATCH] [compose] enable all templates --- app/api/compose/[templateId]/route.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/api/compose/[templateId]/route.ts b/app/api/compose/[templateId]/route.ts index 6aae4b0c..3c148927 100644 --- a/app/api/compose/[templateId]/route.ts +++ b/app/api/compose/[templateId]/route.ts @@ -5,16 +5,10 @@ import templates from '@/templates' import type { InferInsertModel } from 'drizzle-orm' import { encode } from 'next-auth/jwt' -const SUPPORTED_TEMPLATES = ['cal', 'discourse', 'luma', 'poll', 'medium'] - export async function GET( request: Request, { params }: { params: { templateId: keyof typeof templates } } ) { - if (!SUPPORTED_TEMPLATES.includes(params.templateId)) { - throw new Error('This template is not yet supported') - } - const template = templates[params.templateId] if (!template?.shortDescription) { @@ -39,10 +33,6 @@ export async function POST( request: Request, { params }: { params: { templateId: keyof typeof templates } } ) { - if (!SUPPORTED_TEMPLATES.includes(params.templateId)) { - throw new Error('This template is not yet supported') - } - const body = await request.json() const validatedPayload = await validatePayload(body)