chore: wiki: automatic list of all api endpoints

This commit is contained in:
robin committed 2026-08-06 17:39:51 +02:00
1 parent 7664d058df
commit 3fc0697db8
11 files changed
+205 -39

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
import { NextResponse } from "next/server";
import { getSongInfos } from "@/lib/db/managing";
// @wikiDescription: Informationen eines Liedes abrufen
export async function GET(
request: Request,
{ params }: { params: Promise<{ id: string }> }
+1
View File
@@ -1,6 +1,7 @@
import { NextResponse } from "next/server";
import { attachSongToSongbook } from "@/lib/db/managing";
// @wikiDescription: Lied zu einem Liederbuch hinzufügen
export async function POST(request: Request) {
try {
const body = await request.json();
+1
View File
@@ -1,6 +1,7 @@
import { NextResponse } from "next/server";
import { removeSongfromSongbook } from "@/lib/db/managing";
// @wikiDescription: Lied von einem Liederbuch entfernen
export async function POST(request: Request) {
try {
const body = await request.json();
+3
View File
@@ -2,6 +2,7 @@ import { NextResponse } from "next/server";
import { getSongs, addSongToSongbook } from "@/lib/db/managing";
// @wikiDescription: Liste aller Lieder abrufen
export async function GET() {
const songs = await getSongs();
if (songs) {
@@ -10,6 +11,8 @@ export async function GET() {
return NextResponse.json({ success: false}, { status: 500})
}
}
// @wikiDescription: Lied in einem Liederbuch erstellen
export async function POST(request: Request) {
try {
const { title, songbookId, number } = await request.json();