bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
#!/bin/bash
|
|
# Fix: Lägg till reconcilePeriod-export i reconciliation.mjs
|
|
|
|
set -euo pipefail
|
|
|
|
cd /opt/amos/services/aamos-ledger
|
|
|
|
# Backup
|
|
cp reconciliation.mjs reconciliation.mjs.bak-$(date +%s)
|
|
|
|
# Lägg till reconcilePeriod-funktion i slutet av reconciliation.mjs
|
|
cat >> reconciliation.mjs << 'EOF'
|
|
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
// Tillfällig fix: reconcilePeriod för index.mjs-kompatibilitet
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
|
|
export async function reconcilePeriod(ctx, periodId) {
|
|
// TODO: Implementera riktig reconciliation-logik (E1-004)
|
|
return {
|
|
period_id: periodId,
|
|
status: 'not_implemented',
|
|
message: 'Reconciliation engine är under utveckling',
|
|
timestamp: new Date().toISOString(),
|
|
};
|
|
}
|
|
EOF
|
|
|
|
echo "✅ reconcilePeriod tillagd i reconciliation.mjs"
|
|
|
|
# Verifiera syntax
|
|
node --check reconciliation.mjs && echo "✅ Syntax OK" || {
|
|
echo "❌ Syntax error — återställer backup"
|
|
cp reconciliation.mjs.bak-* reconciliation.mjs
|
|
exit 1
|
|
}
|
|
|
|
# Starta om tjänsten
|
|
systemctl restart aamos-ledger
|
|
sleep 2
|
|
systemctl is-active aamos-ledger && echo "✅ aamos-ledger startad" || echo "❌ Start misslyckades"
|