diff --git a/backend/src/repositories/Auth.repository.ts b/backend/src/repositories/Auth.repository.ts index fcd84ce..a40c9c8 100644 --- a/backend/src/repositories/Auth.repository.ts +++ b/backend/src/repositories/Auth.repository.ts @@ -1,6 +1,6 @@ import Repository from "./Repository"; -import { DbUserSchemaType } from "./auth/DbUser.type"; +import { DbUserSchemaType } from "./DbUser.type"; const USERS_DATABASE = "users"; const USERS_COLLECTION = "users_list"; diff --git a/backend/src/repositories/DbUser.type.ts b/backend/src/repositories/DbUser.type.ts new file mode 100644 index 0000000..ad067e1 --- /dev/null +++ b/backend/src/repositories/DbUser.type.ts @@ -0,0 +1,3 @@ +import { UserSchemaType } from "../../../shared/schemas/user.schema"; + +export type DbUserSchemaType = UserSchemaType & { password: string }; diff --git a/backend/src/repositories/auth/DbUser.type.ts b/backend/src/repositories/auth/DbUser.type.ts deleted file mode 100644 index 5fb63d3..0000000 --- a/backend/src/repositories/auth/DbUser.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { UserSchemaType } from "../../../../shared/schemas/user.schema"; - -export type DbUserSchemaType = UserSchemaType & { password: string }; diff --git a/backend/src/routes/controllers/auth/login.controller.ts b/backend/src/routes/controllers/auth/login.controller.ts index 01c3332..748c5ea 100644 --- a/backend/src/routes/controllers/auth/login.controller.ts +++ b/backend/src/routes/controllers/auth/login.controller.ts @@ -1,7 +1,7 @@ import { NextFunction, Request, Response } from "express"; import { WithId } from "mongodb"; import HTTPCodes from "simple-http-codes"; -import { DbUserSchemaType } from "../../../repositories/auth/DbUser.type"; +import { DbUserSchemaType } from "../../../repositories/DbUser.type"; import HttpError from "../../../utils/HttpError"; import { compareHash, signToken } from "../../../utils/crypto"; import { authRepo } from "./auth.router"; diff --git a/backend/src/routes/controllers/auth/signup.controller.ts b/backend/src/routes/controllers/auth/signup.controller.ts index 354d5bf..2ad1a6c 100644 --- a/backend/src/routes/controllers/auth/signup.controller.ts +++ b/backend/src/routes/controllers/auth/signup.controller.ts @@ -6,7 +6,7 @@ import { UserSchemaType } from "../../../../../shared/schemas/user.schema"; import HttpError from "../../../utils/HttpError"; import { hashData } from "../../../utils/crypto"; import { authRepo } from "./auth.router"; -import { DbUserSchemaType } from "../../../repositories/auth/DbUser.type"; +import { DbUserSchemaType } from "../../../repositories/DbUser.type"; export default async function signupController( req: Request,