feat: implement enterprise RBAC, profile identity, system management, and audit stabilization
This commit is contained in:
@@ -3,6 +3,7 @@ import crypto from "crypto";
|
||||
import { PaymentProvider } from "@prisma/client";
|
||||
import { prisma } from "../lib/prisma";
|
||||
import { HttpError } from "../lib/http-error";
|
||||
import { decryptJson } from "../lib/security";
|
||||
import { markInvoicePaid } from "./billing.service";
|
||||
|
||||
type PaymentSettings = {
|
||||
@@ -19,7 +20,7 @@ async function getPaymentSettings(): Promise<PaymentSettings> {
|
||||
const setting = await prisma.setting.findUnique({
|
||||
where: { key: "payment" }
|
||||
});
|
||||
return (setting?.value as PaymentSettings) ?? {};
|
||||
return decryptJson<PaymentSettings>(setting?.value) ?? {};
|
||||
}
|
||||
|
||||
function normalizeProvider(provider: string | undefined, fallback: string): PaymentProvider {
|
||||
|
||||
Reference in New Issue
Block a user