Bestätigungsmail weg

This commit is contained in:
Moritz Utcke
2025-04-21 19:09:57 -03:00
parent 55305f31b7
commit f8e890e9a9
3 changed files with 8 additions and 1 deletions

View File

@@ -11,13 +11,13 @@ export const createCaller = createCallerFactory({
"admin/nicht-ausstellen": await import("../src/pages/api/admin/nicht-ausstellen.ts"),
"admin/registriernummer": await import("../src/pages/api/admin/registriernummer.ts"),
"admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"),
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
"ausweise": await import("../src/pages/api/ausweise/index.ts"),
"auth/access-token": await import("../src/pages/api/auth/access-token.ts"),
"auth/passwort-vergessen": await import("../src/pages/api/auth/passwort-vergessen.ts"),
"auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"),
"bedarfsausweis-gewerbe/[id]": await import("../src/pages/api/bedarfsausweis-gewerbe/[id].ts"),
"bedarfsausweis-gewerbe": await import("../src/pages/api/bedarfsausweis-gewerbe/index.ts"),
"aufnahme": await import("../src/pages/api/aufnahme/index.ts"),
"bedarfsausweis-wohnen/[id]": await import("../src/pages/api/bedarfsausweis-wohnen/[id].ts"),
"bedarfsausweis-wohnen": await import("../src/pages/api/bedarfsausweis-wohnen/index.ts"),
"bilder/[id]": await import("../src/pages/api/bilder/[id].ts"),

View File

@@ -105,6 +105,7 @@ export const GET = defineApiRoute({
code: "BAD_REQUEST",
message:
"Die Rechnung konnte bei LexOffice nicht angelegt werden..",
cause: error
});
}

View File

@@ -3,6 +3,7 @@ import Layout from "#layouts/Layout.astro";
import { BASE_URI } from "#lib/constants";
import { transport } from "#lib/mail";
import { getPrismaAusweisAdapter } from "#lib/server/ausweis";
import { Enums } from "#lib/server/prisma";
import { getCurrentUser } from "#lib/server/user";
const user = await getCurrentUser(Astro)
@@ -12,6 +13,11 @@ if (!user || !id) {
return Astro.redirect("/")
}
// Wir wollen keine Bestätigungsmail wenn ein Admin speichert.
if (user.rolle === Enums.BenutzerRolle.ADMIN) {
return Astro.redirect("/dashboard")
}
const adapter = getPrismaAusweisAdapter(id || "")
if (!adapter) {