Skip to content

Commit

Permalink
[compose] enable all templates
Browse files Browse the repository at this point in the history
  • Loading branch information
FTCHD committed Sep 14, 2024
1 parent 42802a9 commit f73e4d8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions app/api/compose/[templateId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down

0 comments on commit f73e4d8

Please sign in to comment.