Bestätigungsmail weg
This commit is contained in:
@@ -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"),
|
||||
|
||||
@@ -105,6 +105,7 @@ export const GET = defineApiRoute({
|
||||
code: "BAD_REQUEST",
|
||||
message:
|
||||
"Die Rechnung konnte bei LexOffice nicht angelegt werden..",
|
||||
cause: error
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user