i cannot insert data into my postgreSQL db with Prisma Orm

i am working on a next.js web application. i am using vercel, postgreSQL and prisma. this is my prisma schema:

model entry {
  no Int @id @default(autoincrement())
  content String
  cretedAt DateTime @default(now()) @db.Timestamp(0)
  authorName String  @db.VarChar(255)
  baslikName String
  baslik baslik @relation(fields: [baslikName], references: [title], onDelete: NoAction, onUpdate: NoAction)
}

model baslik {
  id Int @id @default(autoincrement())
  title String @unique @db.VarChar(255)
  entries entry[]
}

there are topics called basliks and the users are supposed to submit entries to these baskliks.
baslik page has a submission form to submit entry to that baslik. this the code for baslik/page.js:

"use client"
import ClientComponent from "@/app/baslik/client-component";
import {useSearchParams} from "next/navigation";

export default function Page() {
    const searchParams = useSearchParams()
    const id = searchParams.get("id")// i use this searchParam to pick the spesific baslik 

    return (
        <div>
            <ClientComponent id={id} />
        </div>
    );
}

this is client component:

"use client";
import { useEffect, useState } from 'react';
import fetchBaslik from "@/app/baslik/server-component";
import Entry from "@/app/components/entry";
import styles from "./baslik.css";
import InputForm from "@/app/input/inputForm";

export default function ClientComponent({ id }) {
    const [title, setTitle] = useState('');
    const [entries, setEntries] = useState([]);

    useEffect(() => {
        async function getBaslik() {
            const result = await fetchBaslik(id);
            setTitle(result.title);
            setEntries(result.entries);
        }

        if (id) {
            getBaslik();
        }
    }, [id]);

    return (
        <div className={"baslik-main"}>
            <h1>{title}</h1>
            {entries.map(e => (
                <Entry content={e.content} author={e.authorName} key={e.no}/>
            ))}
            <InputForm baslikName={title}/>
        </div>
    );
}

server component:

"use server";
import { db } from "@/app/lib/prisdb";

export default async function fetchBaslik(id) {
    const baslik = await db.baslik.findUnique({
        where: {
            id: Number(id)
        },
        include: {
            entries: {
                select: {
                    content: true,
                    authorName: true
                }
            }
        }
    });

    // Ensure the result is a plain JSON object
    return JSON.parse(JSON.stringify(baslik));
}

input form:

// InputForm.js

import React, { useState } from 'react';
import "./inputForm.css"
const InputForm = ({ baslikName }) => {
    const [text, setText] = useState('');
    const [nick, setNick] = useState('');
    const [message, setMessage] = useState('');

    const handleSubmit = async (e) => {
        e.preventDefault();

        try {
            const response = await fetch('/api/addEntry', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify({ content: text, authorName: nick, baslikName: baslikName }),
            });

            if (!response.ok) {
                throw new Error('Failed to add entry');
            }

            const result = await response.json();
            setMessage('Entry added successfully');
            setText('');
            setNick('');
        } catch (error) {
            console.error('Error adding entry:', error);
            setMessage('An error occurred');
        }
    };

    return (
        <div className="form-container">
            <form className="entry-form" onSubmit={handleSubmit}>
                <textarea
                    className="text-input"
                    value={text}
                    onChange={(e) => setText(e.target.value)}
                    placeholder="Entry"
                    rows={4}
                    cols={15}
                    required
                />
                <textarea
                    className="nick-input"
                    value={nick}
                    onChange={(e) => setNick(e.target.value)}
                    placeholder="Nick"
                    rows={2}
                    cols={15}
                    required
                />
                <button type="submit" className="submit-button">Submit</button>
            </form>
            {message && <p>{message}</p>}
        </div>
    );
};

export default InputForm;

and addEntry file inside app/pages/api directory:

// pages/api/addEntry.js

import { db } from "@/app/lib/prisdb";

export default async function handler(req, res) {
    if (req.method === 'POST') {
        // Handle POST request
        const { content, authorName, baslikName } = req.body;

        // Validate required fields
        if (!content || !authorName || !baslikName) {
            return res.status(400).json({ error: 'Content, Author Name, and Baslik Name are required' });
        }

        try {
            // Create new entry in the database
            const newEntry = await db.entry.create({
                data: {
                    content: content,
                    authorName: authorName,
                    baslikName: baslikName,
                },
            });

            // Respond with the new entry
            return res.status(200).json(newEntry);
        } catch (error) {
            // Handle database errors
            console.error('Error adding entry:', error.message);
            return res.status(500).json({ error: 'Failed to add entry' });
        }
    } else {
        // Handle other HTTP methods
        res.setHeader('Allow', ['POST']);
        res.status(405).end(`Method ${req.method} Not Allowed`);
    }
}

when you try to submit an entry to a baslik using input the input form, it doesn’t work. but i really can’t say which part of my code causes it. did i build the app wrong or i used wrong a file url? i’d really appreciate if you could help

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật