12 lines
352 B
TypeScript
12 lines
352 B
TypeScript
import { oapiClient, sendResponse } from '@/app/api/oapi-client'
|
|
|
|
export async function POST(
|
|
req: Request,
|
|
{ params }: { params: Promise<{ teamId: string }> },
|
|
) {
|
|
const body = req.body ? await req.json() : {}
|
|
const { teamId } = await params
|
|
const res = await oapiClient.post(`/v1/team/${teamId}/plugins`, body)
|
|
return sendResponse(res)
|
|
}
|