feat: adding onlinefix credentials

This commit is contained in:
Hydra
2024-04-20 17:11:35 +01:00
parent d9056ff0d6
commit 348d927ca1
25 changed files with 357 additions and 245 deletions

View File

@@ -19,7 +19,17 @@ if (process.platform !== "darwin") {
}
if (process.env.SENTRY_DSN) {
init({ dsn: process.env.SENTRY_DSN });
init({
dsn: process.env.SENTRY_DSN,
beforeSend: async (event) => {
const userPreferences = await userPreferencesRepository.findOne({
where: { id: 1 },
});
if (userPreferences?.telemetryEnabled) return event;
return null;
},
});
}
i18n.init({