diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index a629d4d..5533673 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -41,14 +41,6 @@ const RootLayout = async ({
return (
-
{
+ const theme = getTextTheme();
+ const { text, title } = theme;
+
+ return (
+
+ );
+};
+
+export default NoMobileDevice;
diff --git a/src/database/index.ts b/src/database/index.ts
index 9056f8e..5031be8 100644
--- a/src/database/index.ts
+++ b/src/database/index.ts
@@ -15,8 +15,6 @@ import {
} from "../server/entities";
import { options } from "./config/config";
-// [`${path.resolve(__dirname, "../")}server/entities/*.ts`],
-
const sqliteDataSource = new DataSource({
type: "sqlite",
database: options.storage,
@@ -42,17 +40,7 @@ const mySqlDataSource = new DataSource({
username: options.username,
password: options.password,
database: options.database,
- entities: [
- Event,
- Ticket,
- User,
- Session,
- Address,
- ColorScheme,
- Enterprise,
- IssueCategory,
- Subsidiary,
- ],
+ entities: [Event, Ticket, User, Session],
// synchronize: process.env.NODE_ENV !== "production",
synchronize: false,
...(process.env.DB_CA && {
@@ -84,6 +72,14 @@ const startDBConnection = async () => {
category: "database",
level: "log",
message: "Data Source has been initialized!",
+ data: {
+ database: options.database,
+ dialect: options.dialect,
+ host: options.host,
+ port: options.port,
+ userName: options.username,
+ storage: options.storage,
+ },
});
console.log("Data Source has been initialized!");
}
@@ -93,6 +89,14 @@ const startDBConnection = async () => {
category: "database",
level: "error",
message: "Error during Data Source initialization",
+ data: {
+ database: options.database,
+ dialect: options.dialect,
+ host: options.host,
+ port: options.port,
+ userName: options.username,
+ storage: options.storage,
+ },
});
captureException(err, {
tags: {
diff --git a/src/screens/NoMobileDevice/index.tsx b/src/screens/NoMobileDevice/index.tsx
index cff67d2..d54eea8 100644
--- a/src/screens/NoMobileDevice/index.tsx
+++ b/src/screens/NoMobileDevice/index.tsx
@@ -3,7 +3,6 @@
import Logo from "public/Icon.png";
import qrCode from "public/qr-code.png";
-import { useMemo } from "react";
import {
NoMobileContainer,
NoMobileContent,
@@ -14,40 +13,38 @@ import {
QRCodeImage,
QRCodeText,
} from "./styles";
-import { getTextTheme } from "./themeTitle";
-const NoMobileDevicePage = () => {
- const theme = useMemo(() => getTextTheme(), []);
+export interface NoMobileDeviceProps {
+ title: string;
+ text: string;
+}
- const { text, title } = theme;
-
- return (
-
- (
+
+
+
+ {title}
+ {text}
+
+
+
+ Escaneie o QR Code para acessar o Services pelo seu celular
+
+
-
- {title}
- {text}
-
-
-
- Escaneie o QR Code para acessar o Services pelo seu celular
-
-
-
-
- );
-};
+
+
+);
export { NoMobileDevicePage };
diff --git a/src/server/controllers/Session.ts b/src/server/controllers/Session.ts
index 2c59367..1136dfc 100644
--- a/src/server/controllers/Session.ts
+++ b/src/server/controllers/Session.ts
@@ -173,7 +173,7 @@ export class SessionController {
return NextResponse.json(
UserView.getUser({
- error: { message: AuthErrorMessage.InvalidLoginError },
+ error,
status: 500,
}),
{
@@ -247,6 +247,7 @@ export class SessionController {
return NextResponse.redirect(new URL("/login", req.nextUrl.clone()));
} catch (error) {
+ console.log({ error });
const err = error as Error;
captureException(error, {
diff --git a/src/server/entities/index.ts b/src/server/entities/index.ts
index fc24f87..c0092f3 100644
--- a/src/server/entities/index.ts
+++ b/src/server/entities/index.ts
@@ -1,3 +1,5 @@
+import "reflect-metadata";
+
export * from "./Address";
export * from "./ColorScheme";
export * from "./Enterprise";