fix payment service + appsumo + ui

This commit is contained in:
Emily
2025-04-22 18:42:18 +02:00
parent f631c29fb2
commit a9bbc58ad1
13 changed files with 121 additions and 65 deletions

View File

@@ -610,6 +610,8 @@ function isBot(userAgent: string) {
export async function isAllowedToLog(project_id: string, website: string, ip: string, userAgent: string) {
console.log({ userAgent });
const blacklistData = await AddressBlacklistModel.find({ project_id }, { address: 1 });
for (const blacklistedData of blacklistData) {
if (blacklistedData.address == ip) return false;

View File

@@ -16,6 +16,7 @@ const streamName = requireEnv('STREAM_NAME');
import DeprecatedRouter from "./deprecated";
import { isAllowedToLog } from "./controller";
import { connectDatabase } from "./shared/services/DatabaseService";
app.use('/v1', DeprecatedRouter);
app.post('/event', express.json(jsonOptions), async (req, res) => {