Buchungskalender: Verdrahtung absichern (Outbox, Shop-Webhook, Session)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a68baf10d9
commit
d7b5b98187
6 files changed
+45
-4
No files matched your search
@@ -43,7 +43,12 @@ async function verarbeite(event, now) {
|
||||
if (event.type === 'account.updated') {
|
||||
await kontoAktualisiert(accountId || objekt.id, objekt, now)
|
||||
// dasselbe Konto kann auch im Buchungskalender haengen
|
||||
await kontoAktualisiertUk(accountId || objekt.id, objekt, now)
|
||||
try {
|
||||
await kontoAktualisiertUk(accountId || objekt.id, objekt, now)
|
||||
} catch (err) {
|
||||
// ein Fehler im Buchungskalender darf die Antwort fuer den Shop nie beeinflussen (ohne Kundendaten im Log)
|
||||
console.warn(`[shop] Webhook account.updated: Buchungskalender nicht aktualisiert: ${err?.name}`)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (!accountId) return
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Router } from 'express'
|
||||
import { requireSession } from '../middleware/session.js'
|
||||
|
||||
/**
|
||||
* Kunden-API des Buchungskalenders: /api/unterkunft (Session, Projekt per ?projectId=; Vertrag: docs/funktionen/unterkunft-api.md).
|
||||
@@ -6,5 +7,7 @@ import { Router } from 'express'
|
||||
* und Stripe; Task 11 die Anfrage-Funktion (/anfrage-funktion).
|
||||
*/
|
||||
const router = Router()
|
||||
// Jede Route hier braucht eine Sitzung (Task 8 darf das nicht vergessen); Kunden-Pruefung je Route wie in routes/shop.js
|
||||
router.use(requireSession)
|
||||
|
||||
export default router
|
||||
Reference in new issue
Block a user