silverwolf-x's picture
download
raw
467 Bytes
import type { NextApiRequest, NextApiResponse } from "next";
import { client, e } from "../../../client";
// POST /api/post
// body {title: string; content: string; authorName: string}
export default async function handle(
req: NextApiRequest,
res: NextApiResponse,
) {
const { title, content, authorName } = req.body;
const result = await e
.insert(e.Post, {
title,
content,
authorName,
})
.run(client);
res.json(result);
}

Xet Storage Details

Size:
467 Bytes
·
Xet hash:
15896f7f3b093392ffc4afc2b6e436739dd324ffd54f202245faac21035fb29e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.