fix: remove sentry before migration

This commit is contained in:
Andras Bacsai 2022-11-29 15:13:05 +01:00
parent e7dd13cffa
commit 3c723bcba2
3 changed files with 21 additions and 21 deletions

View File

@ -249,12 +249,12 @@ async function initServer() {
await prisma.setting.update({ where: { id: '0' }, data: { sentryDSN } }) await prisma.setting.update({ where: { id: '0' }, data: { sentryDSN } })
} }
// Initialize Sentry // Initialize Sentry
Sentry.init({ // Sentry.init({
dsn: sentryDSN, // dsn: sentryDSN,
environment: isDev ? 'development' : 'production', // environment: isDev ? 'development' : 'production',
release: version // release: version
}); // });
console.log('[000] Sentry initialized...') // console.log('[000] Sentry initialized...')
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)

View File

@ -84,12 +84,12 @@ export async function saveSettings(request: FastifyRequest<SaveSettings>, reply:
await prisma.setting.update({ where: { id }, data: { minPort, maxPort } }); await prisma.setting.update({ where: { id }, data: { minPort, maxPort } });
} }
if (doNotTrack === false) { if (doNotTrack === false) {
Sentry.init({ // Sentry.init({
dsn: sentryDSN, // dsn: sentryDSN,
environment: isDev ? 'development' : 'production', // environment: isDev ? 'development' : 'production',
release: version // release: version
}); // });
console.log('Sentry initialized') // console.log('Sentry initialized')
} }
return reply.code(201).send() return reply.code(201).send()
} catch ({ status, message }) { } catch ({ status, message }) {

View File

@ -106,15 +106,15 @@
if (teamId) $appSession.teamId = teamId; if (teamId) $appSession.teamId = teamId;
if (permission) $appSession.permission = permission; if (permission) $appSession.permission = permission;
if (isAdmin) $appSession.isAdmin = isAdmin; if (isAdmin) $appSession.isAdmin = isAdmin;
if (settings?.doNotTrack === false) { // if (settings?.doNotTrack === false) {
Sentry.init({ // Sentry.init({
dsn: sentryDSN, // dsn: sentryDSN,
environment: dev ? 'development' : 'production', // environment: dev ? 'development' : 'production',
integrations: [new BrowserTracing()], // integrations: [new BrowserTracing()],
release: $appSession.version?.toString(), // release: $appSession.version?.toString(),
tracesSampleRate: 0.2 // tracesSampleRate: 0.2
}); // });
} // }
async function logout() { async function logout() {
try { try {
Cookies.remove('token'); Cookies.remove('token');