Initial Product release

This commit is contained in:
2026-07-13 21:44:49 +01:00
parent 2d3ff69c6e
commit 0837f4f529
84 changed files with 13174 additions and 36 deletions
+28
View File
@@ -0,0 +1,28 @@
function parseJsonSafe(value) {
if (!value) {
return null;
}
if (typeof value === 'object') {
return value;
}
try {
return JSON.parse(value);
} catch (_error) {
return null;
}
}
function readFormArray(body, key) {
if (Array.isArray(body[key])) {
return body[key];
}
if (body[key] === undefined) {
return [];
}
return [body[key]];
}
module.exports = {
parseJsonSafe,
readFormArray
};