docs: Zusatzfunktionen (Kai, 25.06.2025) in TODO.md ergänzt
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
// /pages/api/cpl/updateKueSettingsDataAPIHandler.ts
|
||||
import path from "path";
|
||||
import fs from "fs/promises";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse
|
||||
) {
|
||||
let { key, value, slot } = req.query;
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const { key, value, slot } = req.query;
|
||||
|
||||
if (!key || slot === undefined) {
|
||||
return res.status(400).json({ error: "Missing key or slot parameter." });
|
||||
if (
|
||||
typeof key !== "string" ||
|
||||
typeof value !== "string" ||
|
||||
typeof slot !== "string"
|
||||
) {
|
||||
return res
|
||||
.status(400)
|
||||
.json({ error: "Missing or invalid key, value, or slot parameter." });
|
||||
}
|
||||
|
||||
const mockFilePath = path.join(
|
||||
|
||||
Reference in New Issue
Block a user