Portal: Admin-Panel, Rechnungsanalyse und alte Admin-Schnittstellen entfernt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a4fa581c0
commit
7c00633db0
43 files changed
+229
-4001
No files matched your search
@@ -216,7 +216,7 @@ router.get('/', requireSession, async (req, res) => {
|
||||
router.post('/checkout', requireSession, async (req, res) => {
|
||||
try {
|
||||
if (req.session.viewAs) {
|
||||
return res.status(403).json({ error: 'Im "Als Kunde ansehen"-Modus kann nicht bestellt werden.' })
|
||||
return res.status(403).json({ error: 'In der Kundenansicht kann nicht bestellt werden.' })
|
||||
}
|
||||
const { productKey, acceptTerms, startChoice, termsVersion, offerId, lateStartAt: shownLateStart } = req.body || {}
|
||||
if (!PRODUCT_KEYS.includes(productKey)) {
|
||||
@@ -280,7 +280,7 @@ router.post('/checkout', requireSession, async (req, res) => {
|
||||
router.post('/portal', requireSession, async (req, res) => {
|
||||
try {
|
||||
if (req.session.viewAs) {
|
||||
return res.status(403).json({ error: 'Im "Als Kunde ansehen"-Modus nicht möglich.' })
|
||||
return res.status(403).json({ error: 'In der Kundenansicht nicht möglich.' })
|
||||
}
|
||||
const url = await createBillingPortalUrl(getSessionCustomerId(req))
|
||||
return res.json({ url })
|
||||
@@ -297,7 +297,7 @@ router.post('/portal', requireSession, async (req, res) => {
|
||||
router.post('/storage/preview', requireSession, async (req, res) => {
|
||||
try {
|
||||
if (req.session.viewAs) {
|
||||
return res.status(403).json({ error: 'Im "Als Kunde ansehen"-Modus nicht möglich.' })
|
||||
return res.status(403).json({ error: 'In der Kundenansicht nicht möglich.' })
|
||||
}
|
||||
return res.json(await previewStorageChange(getSessionCustomerId(req), req.body?.units))
|
||||
} catch (err) {
|
||||
@@ -314,7 +314,7 @@ router.post('/storage/preview', requireSession, async (req, res) => {
|
||||
router.post('/storage', requireSession, async (req, res) => {
|
||||
try {
|
||||
if (req.session.viewAs) {
|
||||
return res.status(403).json({ error: 'Im "Als Kunde ansehen"-Modus kann der Zusatzspeicher nicht geändert werden.' })
|
||||
return res.status(403).json({ error: 'In der Kundenansicht kann der Zusatzspeicher nicht geändert werden.' })
|
||||
}
|
||||
const customerId = getSessionCustomerId(req)
|
||||
const { units, acceptTerms, termsVersion } = req.body || {}
|
||||
@@ -350,7 +350,7 @@ router.post('/storage', requireSession, async (req, res) => {
|
||||
router.post('/switch/preview', requireSession, async (req, res) => {
|
||||
try {
|
||||
if (req.session.viewAs) {
|
||||
return res.status(403).json({ error: 'Im "Als Kunde ansehen"-Modus nicht möglich.' })
|
||||
return res.status(403).json({ error: 'In der Kundenansicht nicht möglich.' })
|
||||
}
|
||||
return res.json(await previewSwitch(getSessionCustomerId(req)))
|
||||
} catch (err) {
|
||||
@@ -368,7 +368,7 @@ router.post('/switch/preview', requireSession, async (req, res) => {
|
||||
router.post('/switch', requireSession, async (req, res) => {
|
||||
try {
|
||||
if (req.session.viewAs) {
|
||||
return res.status(403).json({ error: 'Im "Als Kunde ansehen"-Modus kann nicht gewechselt werden.' })
|
||||
return res.status(403).json({ error: 'In der Kundenansicht kann nicht gewechselt werden.' })
|
||||
}
|
||||
const { acceptTerms, earlyStart, termsVersion, prorationDate, amountDueCents } = req.body || {}
|
||||
if (acceptTerms !== true) {
|
||||
|
||||
Reference in new issue
Block a user