Fix TypeScript errors and implement furniture import ID integrity with 18+ age verification
- Add termsAccepted and ageVerified columns to User table - Update register schema with new boolean fields - Fix register form age verification checkbox (th -> t) - Fix furni-import spriteId declaration order - Fix batch route variable naming (id -> spriteId) - Fix catalog-audit import path and ensure correct types - Hardened import with per-item id conflict checks - Added audit option for FurnitureData.json spriteId conflicts - Updated tagline to include Leeftijdsvereiste: 18+
This commit is contained in:
1 parent
e5ec3c1f06
commit
e76c530e4f
13 files changed
+267
-104
No files matched your search
@@ -155,6 +155,7 @@ export function AuditClient() {
|
||||
const [applySql, setApplySql] = useState(false);
|
||||
const [repairFurniData, setRepairFurniData] = useState(false);
|
||||
const [repairStructure, setRepairStructure] = useState(false);
|
||||
const [checkFurniDataIds, setCheckFurniDataIds] = useState(false);
|
||||
|
||||
const [issues, setIssues] = useState<AuditIssue[]>([]);
|
||||
const [missingFromSources, setMissingFromSources] = useState<
|
||||
@@ -421,6 +422,13 @@ export function AuditClient() {
|
||||
>
|
||||
Repair FurnitureData.json (add missing + dedupe)
|
||||
</AuditCheckbox>
|
||||
<AuditCheckbox
|
||||
checked={checkFurniDataIds}
|
||||
disabled={loading}
|
||||
onChange={setCheckFurniDataIds}
|
||||
>
|
||||
Check FurnitureData.json for spriteId conflicts
|
||||
</AuditCheckbox>
|
||||
<AuditCheckbox
|
||||
checked={repairStructure}
|
||||
disabled={loading}
|
||||
|
||||
@@ -18,6 +18,7 @@ export const POST = withAdmin(
|
||||
let applySql = false;
|
||||
let repairFurniData = false;
|
||||
let repairStructure = false;
|
||||
let checkFurniDataIds = false;
|
||||
try {
|
||||
const body = (await request.json().catch(() => ({}))) as {
|
||||
repair?: unknown;
|
||||
@@ -26,6 +27,7 @@ export const POST = withAdmin(
|
||||
applySql?: unknown;
|
||||
repairFurniData?: unknown;
|
||||
repairStructure?: unknown;
|
||||
checkFurniDataIds?: unknown;
|
||||
};
|
||||
repair = body.repair === true;
|
||||
repairNitros = body.repairNitros === true;
|
||||
@@ -33,6 +35,7 @@ export const POST = withAdmin(
|
||||
applySql = body.applySql === true;
|
||||
repairFurniData = body.repairFurniData === true;
|
||||
repairStructure = body.repairStructure === true;
|
||||
checkFurniDataIds = body.checkFurniDataIds === true;
|
||||
} catch (err) {
|
||||
logger.warn("Failed to parse audit request body", { err });
|
||||
}
|
||||
@@ -55,6 +58,7 @@ export const POST = withAdmin(
|
||||
applySql,
|
||||
repairFurniData,
|
||||
repairStructure,
|
||||
checkFurniDataIds,
|
||||
});
|
||||
} catch (err) {
|
||||
send({
|
||||
|
||||
Reference in new issue
Block a user