Buchungskalender: Mails – Link-Pflicht und Testprotokoll nur im Test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e15486263f
commit
4553bc8e92
5 files changed
+42
-10
No files matched your search
@@ -2,9 +2,11 @@
|
||||
import { UkFehler } from './fehler.js'
|
||||
|
||||
export const _aufrufe = []
|
||||
/** Aufrufprotokoll nur im Test (UK_TESTPROTOKOLL, setzt useTestEnv); in Produktion waechst nichts. */
|
||||
const testProtokoll = () => process.env.NODE_ENV === 'test' || process.env.UK_TESTPROTOKOLL === '1'
|
||||
|
||||
export async function erstatte(ctx, anfrage, betragCent, { now, idempotencyKey } = {}) {
|
||||
_aufrufe.push({ anfrageId: anfrage?.$id, betragCent, idempotencyKey })
|
||||
if (testProtokoll()) _aufrufe.push({ anfrageId: anfrage?.$id, betragCent, idempotencyKey })
|
||||
if (!ctx?.einstellungen?.stripeAccountId) throw new UkFehler(409, 'online_aus')
|
||||
return { erstattetCent: betragCent }
|
||||
}
|
||||
Reference in new issue
Block a user