initial 2
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-06-26 09:26:50 +01:00
parent 194330fb47
commit 3b37368e7d
213 changed files with 14688 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
import { handleApi } from "@/lib/api";
import { logCalibrePages } from "@/lib/services/calibre-reading";
import { requireUser } from "@/lib/services/user";
import { todayString } from "@/lib/dates";
export async function POST(
request: Request,
{ params }: { params: Promise<{ id: string }> }
) {
const { id } = await params;
const calibreBookId = Number(id);
const body = await request.json();
return handleApi(async () => {
const { user } = await requireUser();
return logCalibrePages(
user.id,
calibreBookId,
body.pages ?? 10,
body.date ?? todayString()
);
});
}