diff --git a/src/apiHelpers/HttpStatusCodes.ts b/src/api/apiHelpers/HttpStatusCodes.ts similarity index 100% rename from src/apiHelpers/HttpStatusCodes.ts rename to src/api/apiHelpers/HttpStatusCodes.ts diff --git a/src/dtos/AbstractDto.ts b/src/api/dtos/AbstractDto.ts similarity index 100% rename from src/dtos/AbstractDto.ts rename to src/api/dtos/AbstractDto.ts diff --git a/src/dtos/AuthPayload.ts b/src/api/dtos/AuthPayload.ts similarity index 100% rename from src/dtos/AuthPayload.ts rename to src/api/dtos/AuthPayload.ts diff --git a/src/dtos/ChangeUserPasswordRequest.ts b/src/api/dtos/ChangeUserPasswordRequest.ts similarity index 100% rename from src/dtos/ChangeUserPasswordRequest.ts rename to src/api/dtos/ChangeUserPasswordRequest.ts diff --git a/src/dtos/CompactRecipeDto.ts b/src/api/dtos/CompactRecipeDto.ts similarity index 100% rename from src/dtos/CompactRecipeDto.ts rename to src/api/dtos/CompactRecipeDto.ts diff --git a/src/dtos/CreateUserRequest.ts b/src/api/dtos/CreateUserRequest.ts similarity index 100% rename from src/dtos/CreateUserRequest.ts rename to src/api/dtos/CreateUserRequest.ts diff --git a/src/dtos/CreateUserResponse.ts b/src/api/dtos/CreateUserResponse.ts similarity index 100% rename from src/dtos/CreateUserResponse.ts rename to src/api/dtos/CreateUserResponse.ts diff --git a/src/dtos/LoginRequest.ts b/src/api/dtos/LoginRequest.ts similarity index 100% rename from src/dtos/LoginRequest.ts rename to src/api/dtos/LoginRequest.ts diff --git a/src/dtos/LoginResponse.ts b/src/api/dtos/LoginResponse.ts similarity index 100% rename from src/dtos/LoginResponse.ts rename to src/api/dtos/LoginResponse.ts diff --git a/src/dtos/RecipeDto.ts b/src/api/dtos/RecipeDto.ts similarity index 100% rename from src/dtos/RecipeDto.ts rename to src/api/dtos/RecipeDto.ts diff --git a/src/dtos/RecipeIngredientDto.ts b/src/api/dtos/RecipeIngredientDto.ts similarity index 100% rename from src/dtos/RecipeIngredientDto.ts rename to src/api/dtos/RecipeIngredientDto.ts diff --git a/src/dtos/RecipeIngredientGroupDto.ts b/src/api/dtos/RecipeIngredientGroupDto.ts similarity index 100% rename from src/dtos/RecipeIngredientGroupDto.ts rename to src/api/dtos/RecipeIngredientGroupDto.ts diff --git a/src/dtos/RecipeInstructionStepDto.ts b/src/api/dtos/RecipeInstructionStepDto.ts similarity index 100% rename from src/dtos/RecipeInstructionStepDto.ts rename to src/api/dtos/RecipeInstructionStepDto.ts diff --git a/src/dtos/UserDto.ts b/src/api/dtos/UserDto.ts similarity index 100% rename from src/dtos/UserDto.ts rename to src/api/dtos/UserDto.ts diff --git a/src/dtos/UserListResponse.ts b/src/api/dtos/UserListResponse.ts similarity index 100% rename from src/dtos/UserListResponse.ts rename to src/api/dtos/UserListResponse.ts diff --git a/src/endpoints/AuthRestResource.ts b/src/api/endpoints/AuthRestResource.ts similarity index 84% rename from src/endpoints/AuthRestResource.ts rename to src/api/endpoints/AuthRestResource.ts index 8ee84d0..da7f1dd 100644 --- a/src/endpoints/AuthRestResource.ts +++ b/src/api/endpoints/AuthRestResource.ts @@ -1,7 +1,7 @@ import { Router } from "express"; -import { AuthHandler } from "../handlers/AuthHandler.js"; -import { UserRepository } from "../repositories/UserRepository.js"; -import { UserDtoEntityMapper } from "../mappers/UserDtoEntityMapper.js"; +import { AuthHandler } from "../../handlers/AuthHandler.js"; +import { UserRepository } from "../../repositories/UserRepository.js"; +import { UserDtoEntityMapper } from "../../mappers/UserDtoEntityMapper.js"; import { ValidationError, UnauthorizedError, diff --git a/src/endpoints/CompactRecipeRestResource.ts b/src/api/endpoints/CompactRecipeRestResource.ts similarity index 74% rename from src/endpoints/CompactRecipeRestResource.ts rename to src/api/endpoints/CompactRecipeRestResource.ts index 8a822e9..0dfa735 100644 --- a/src/endpoints/CompactRecipeRestResource.ts +++ b/src/api/endpoints/CompactRecipeRestResource.ts @@ -1,8 +1,8 @@ import { Router } from "express"; -import { asyncHandler } from "../utils/asyncHandler.js"; -import { RecipeRepository } from "../repositories/RecipeRepository.js"; -import { CompactRecipeHandler } from "../handlers/CompactRecipeHandler.js"; -import { CompactRecipeDtoEntityMapper } from "../mappers/CompactRecipeDtoEntityMapper.js"; +import { asyncHandler } from "../../utils/asyncHandler.js"; +import { RecipeRepository } from "../../repositories/RecipeRepository.js"; +import { CompactRecipeHandler } from "../../handlers/CompactRecipeHandler.js"; +import { CompactRecipeDtoEntityMapper } from "../../mappers/CompactRecipeDtoEntityMapper.js"; import {HttpStatusCode} from "../apiHelpers/HttpStatusCodes.js"; /** diff --git a/src/endpoints/RecipeRestResource.ts b/src/api/endpoints/RecipeRestResource.ts similarity index 71% rename from src/endpoints/RecipeRestResource.ts rename to src/api/endpoints/RecipeRestResource.ts index a6a3886..f441feb 100644 --- a/src/endpoints/RecipeRestResource.ts +++ b/src/api/endpoints/RecipeRestResource.ts @@ -1,12 +1,12 @@ import { Router } from "express"; -import { RecipeRepository } from "../repositories/RecipeRepository.js"; -import { RecipeDtoEntityMapper } from "../mappers/RecipeDtoEntityMapper.js"; -import { RecipeHandler } from "../handlers/RecipeHandler.js"; -import { asyncHandler } from "../utils/asyncHandler.js"; +import { RecipeRepository } from "../../repositories/RecipeRepository.js"; +import { RecipeDtoEntityMapper } from "../../mappers/RecipeDtoEntityMapper.js"; +import { RecipeHandler } from "../../handlers/RecipeHandler.js"; +import { asyncHandler } from "../../utils/asyncHandler.js"; import { RecipeDto } from "../dtos/RecipeDto.js"; -import { RecipeIngredientDtoEntityMapper } from "../mappers/RecipeIngredientDtoEntityMapper.js"; -import { RecipeIngredientGroupDtoEntityMapper } from "../mappers/RecipeIngredientGroupDtoEntityMapper.js"; -import { RecipeInstructionStepDtoEntityMapper } from "../mappers/RecipeInstructionStepDtoEntityMapper.js"; +import { RecipeIngredientDtoEntityMapper } from "../../mappers/RecipeIngredientDtoEntityMapper.js"; +import { RecipeIngredientGroupDtoEntityMapper } from "../../mappers/RecipeIngredientGroupDtoEntityMapper.js"; +import { RecipeInstructionStepDtoEntityMapper } from "../../mappers/RecipeInstructionStepDtoEntityMapper.js"; import {HttpStatusCode} from "../apiHelpers/HttpStatusCodes.js"; /** diff --git a/src/endpoints/UserRestResource.ts b/src/api/endpoints/UserRestResource.ts similarity index 91% rename from src/endpoints/UserRestResource.ts rename to src/api/endpoints/UserRestResource.ts index 2f1abb4..01dd84a 100644 --- a/src/endpoints/UserRestResource.ts +++ b/src/api/endpoints/UserRestResource.ts @@ -1,16 +1,16 @@ import { Router } from "express"; -import { UserHandler } from "../handlers/UserHandler.js"; +import { UserHandler } from "../../handlers/UserHandler.js"; import { CreateUserRequest } from "../dtos/CreateUserRequest.js"; -import { UserRepository } from "../repositories/UserRepository.js"; -import { UserDtoEntityMapper } from "../mappers/UserDtoEntityMapper.js"; -import { asyncHandler } from "../utils/asyncHandler.js"; +import { UserRepository } from "../../repositories/UserRepository.js"; +import { UserDtoEntityMapper } from "../../mappers/UserDtoEntityMapper.js"; +import { asyncHandler } from "../../utils/asyncHandler.js"; import { CreateUserResponse } from "../dtos/CreateUserResponse.js"; import { UserDto } from "../dtos/UserDto.js"; import { requireAdmin, requireAdminOrOwner, requireAdminOrSelf -} from "../middleware/authorizationMiddleware.js"; +} from "../../middleware/authorizationMiddleware.js"; import { UserListResponse } from "../dtos/UserListResponse.js"; import { HttpStatusCode } from "../apiHelpers/HttpStatusCodes.js"; import { InternalServerError, NotFoundError } from "../errors/httpErrors.js"; diff --git a/src/enums/UserRole.ts b/src/api/enums/UserRole.ts similarity index 100% rename from src/enums/UserRole.ts rename to src/api/enums/UserRole.ts diff --git a/src/errors/httpErrors.ts b/src/api/errors/httpErrors.ts similarity index 100% rename from src/errors/httpErrors.ts rename to src/api/errors/httpErrors.ts diff --git a/src/entities/UserEntity.ts b/src/entities/UserEntity.ts index 1415302..621e926 100644 --- a/src/entities/UserEntity.ts +++ b/src/entities/UserEntity.ts @@ -1,6 +1,6 @@ import { Entity, Column } from "typeorm"; import { AbstractEntity } from "./AbstractEntity.js"; -import { UserRole } from "../enums/UserRole.js"; +import { UserRole } from "../api/enums/UserRole.js"; /** * Entity describing a user diff --git a/src/handlers/AuthHandler.ts b/src/handlers/AuthHandler.ts index 4f2bffa..64b585e 100644 --- a/src/handlers/AuthHandler.ts +++ b/src/handlers/AuthHandler.ts @@ -1,9 +1,9 @@ import { UserRepository } from "../repositories/UserRepository.js"; import { encrypt } from "../utils/encryptionUtils.js"; -import { ValidationError, UnauthorizedError } from "../errors/httpErrors.js"; +import { ValidationError, UnauthorizedError } from "../api/errors/httpErrors.js"; import { UserDtoEntityMapper } from "../mappers/UserDtoEntityMapper.js"; -import { LoginResponse } from "../dtos/LoginResponse.js"; -import { LoginRequest } from "../dtos/LoginRequest.js"; +import { LoginResponse } from "../api/dtos/LoginResponse.js"; +import { LoginRequest } from "../api/dtos/LoginRequest.js"; /** * Controller responsible for authentication, e.g., login or issueing a token with extended diff --git a/src/handlers/CompactRecipeHandler.ts b/src/handlers/CompactRecipeHandler.ts index 61482cd..f83a490 100644 --- a/src/handlers/CompactRecipeHandler.ts +++ b/src/handlers/CompactRecipeHandler.ts @@ -1,4 +1,4 @@ -import { CompactRecipeDto } from "../dtos/CompactRecipeDto.js"; +import { CompactRecipeDto } from "../api/dtos/CompactRecipeDto.js"; import { RecipeEntity } from "../entities/RecipeEntity.js"; import { CompactRecipeDtoEntityMapper } from "../mappers/CompactRecipeDtoEntityMapper.js"; import { RecipeRepository } from "../repositories/RecipeRepository.js"; diff --git a/src/handlers/RecipeHandler.ts b/src/handlers/RecipeHandler.ts index 4aef98e..d0fe116 100644 --- a/src/handlers/RecipeHandler.ts +++ b/src/handlers/RecipeHandler.ts @@ -1,10 +1,10 @@ -import { RecipeDto } from "../dtos/RecipeDto.js"; +import { RecipeDto } from "../api/dtos/RecipeDto.js"; import { RecipeDtoEntityMapper } from "../mappers/RecipeDtoEntityMapper.js"; import { RecipeRepository } from "../repositories/RecipeRepository.js"; -import { NotFoundError, ValidationError } from "../errors/httpErrors.js"; -import { RecipeInstructionStepDto } from "../dtos/RecipeInstructionStepDto.js"; -import { RecipeIngredientGroupDto } from "../dtos/RecipeIngredientGroupDto.js"; -import { RecipeIngredientDto } from "../dtos/RecipeIngredientDto.js"; +import { NotFoundError, ValidationError } from "../api/errors/httpErrors.js"; +import { RecipeInstructionStepDto } from "../api/dtos/RecipeInstructionStepDto.js"; +import { RecipeIngredientGroupDto } from "../api/dtos/RecipeIngredientGroupDto.js"; +import { RecipeIngredientDto } from "../api/dtos/RecipeIngredientDto.js"; import { RecipeEntity } from "../entities/RecipeEntity.js"; /** diff --git a/src/handlers/UserHandler.ts b/src/handlers/UserHandler.ts index e51776e..e7e674e 100644 --- a/src/handlers/UserHandler.ts +++ b/src/handlers/UserHandler.ts @@ -1,13 +1,13 @@ -import {ConflictError, NotFoundError, ValidationError} from "../errors/httpErrors.js"; -import {CreateUserRequest} from "../dtos/CreateUserRequest.js"; -import {UserDto} from "../dtos/UserDto.js"; +import {ConflictError, NotFoundError, ValidationError} from "../api/errors/httpErrors.js"; +import {CreateUserRequest} from "../api/dtos/CreateUserRequest.js"; +import {UserDto} from "../api/dtos/UserDto.js"; import {encrypt} from "../utils/encryptionUtils.js"; import {UserRepository} from "../repositories/UserRepository.js"; import {UserDtoEntityMapper} from "../mappers/UserDtoEntityMapper.js"; import {UUID} from "crypto"; -import {ChangeUserPasswordRequest} from "../dtos/ChangeUserPasswordRequest.js"; +import {ChangeUserPasswordRequest} from "../api/dtos/ChangeUserPasswordRequest.js"; import {UserEntity} from "../entities/UserEntity.js"; -import {UserRole, UserRoleHelper} from "../enums/UserRole.js"; +import {UserRole, UserRoleHelper} from "../api/enums/UserRole.js"; /** * Controls all user specific actions diff --git a/src/index.ts b/src/index.ts index 7c917f4..de20338 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,11 +6,11 @@ import { requestLoggerMiddleware } from "./middleware/requestLoggerMiddleware.js import { errorLoggerMiddleware } from "./middleware/errorLoggerMiddleware.js"; import { corsHeaders } from "./middleware/corsMiddleware.js"; import { logger } from "./utils/logger.js"; -import { HttpStatusCode } from "./apiHelpers/HttpStatusCodes.js"; -import authRoutes, { authBasicRoute } from "./endpoints/AuthRestResource.js"; -import userRoutes, { userBasicRoute } from "./endpoints/UserRestResource.js"; -import compactRecipeRoutes from "./endpoints/CompactRecipeRestResource.js"; -import recipeRoutes from "./endpoints/RecipeRestResource.js"; +import { HttpStatusCode } from "./api/apiHelpers/HttpStatusCodes.js"; +import authRoutes, { authBasicRoute } from "./api/endpoints/AuthRestResource.js"; +import userRoutes, { userBasicRoute } from "./api/endpoints/UserRestResource.js"; +import compactRecipeRoutes from "./api/endpoints/CompactRecipeRestResource.js"; +import recipeRoutes from "./api/endpoints/RecipeRestResource.js"; dotenv.config(); diff --git a/src/mappers/AbstractDtoEntityMapper.ts b/src/mappers/AbstractDtoEntityMapper.ts index dd878bc..935c341 100644 --- a/src/mappers/AbstractDtoEntityMapper.ts +++ b/src/mappers/AbstractDtoEntityMapper.ts @@ -1,4 +1,4 @@ -import { AbstractDto } from "../dtos/AbstractDto.js"; +import { AbstractDto } from "../api/dtos/AbstractDto.js"; import { AbstractEntity } from "../entities/AbstractEntity.js"; export abstract class AbstractDtoEntityMapper< diff --git a/src/mappers/CompactRecipeDtoEntityMapper.ts b/src/mappers/CompactRecipeDtoEntityMapper.ts index b8040a3..3578df8 100644 --- a/src/mappers/CompactRecipeDtoEntityMapper.ts +++ b/src/mappers/CompactRecipeDtoEntityMapper.ts @@ -1,4 +1,4 @@ -import { CompactRecipeDto } from "../dtos/CompactRecipeDto.js"; +import { CompactRecipeDto } from "../api/dtos/CompactRecipeDto.js"; import { RecipeEntity } from "../entities/RecipeEntity.js"; import { AbstractDtoEntityMapper } from "./AbstractDtoEntityMapper.js"; diff --git a/src/mappers/RecipeDtoEntityMapper.ts b/src/mappers/RecipeDtoEntityMapper.ts index ee97da9..f5bb591 100644 --- a/src/mappers/RecipeDtoEntityMapper.ts +++ b/src/mappers/RecipeDtoEntityMapper.ts @@ -1,6 +1,6 @@ -import { RecipeDto } from "../dtos/RecipeDto.js"; -import { RecipeIngredientGroupDto } from "../dtos/RecipeIngredientGroupDto.js"; -import { RecipeInstructionStepDto } from "../dtos/RecipeInstructionStepDto.js"; +import { RecipeDto } from "../api/dtos/RecipeDto.js"; +import { RecipeIngredientGroupDto } from "../api/dtos/RecipeIngredientGroupDto.js"; +import { RecipeInstructionStepDto } from "../api/dtos/RecipeInstructionStepDto.js"; import { RecipeEntity } from "../entities/RecipeEntity.js"; import { AbstractDtoEntityMapper } from "./AbstractDtoEntityMapper.js"; import { RecipeIngredientGroupDtoEntityMapper } from "./RecipeIngredientGroupDtoEntityMapper.js"; diff --git a/src/mappers/RecipeIngredientDtoEntityMapper.ts b/src/mappers/RecipeIngredientDtoEntityMapper.ts index fb1f6cd..be7a35a 100644 --- a/src/mappers/RecipeIngredientDtoEntityMapper.ts +++ b/src/mappers/RecipeIngredientDtoEntityMapper.ts @@ -1,4 +1,4 @@ -import { RecipeIngredientDto } from "../dtos/RecipeIngredientDto.js"; +import { RecipeIngredientDto } from "../api/dtos/RecipeIngredientDto.js"; import { RecipeIngredientEntity } from "../entities/RecipeIngredientEntity.js"; import { AbstractDtoEntityMapper } from "./AbstractDtoEntityMapper.js"; diff --git a/src/mappers/RecipeIngredientGroupDtoEntityMapper.ts b/src/mappers/RecipeIngredientGroupDtoEntityMapper.ts index 3002695..966143f 100644 --- a/src/mappers/RecipeIngredientGroupDtoEntityMapper.ts +++ b/src/mappers/RecipeIngredientGroupDtoEntityMapper.ts @@ -1,5 +1,5 @@ -import { RecipeIngredientDto } from "../dtos/RecipeIngredientDto.js"; -import { RecipeIngredientGroupDto } from "../dtos/RecipeIngredientGroupDto.js"; +import { RecipeIngredientDto } from "../api/dtos/RecipeIngredientDto.js"; +import { RecipeIngredientGroupDto } from "../api/dtos/RecipeIngredientGroupDto.js"; import { RecipeIngredientGroupEntity } from "../entities/RecipeIngredientGroupEntity.js"; import { AbstractDtoEntityMapper } from "./AbstractDtoEntityMapper.js"; import { RecipeIngredientDtoEntityMapper } from "./RecipeIngredientDtoEntityMapper.js"; diff --git a/src/mappers/RecipeInstructionStepDtoEntityMapper.ts b/src/mappers/RecipeInstructionStepDtoEntityMapper.ts index 14f02ff..884e8bd 100644 --- a/src/mappers/RecipeInstructionStepDtoEntityMapper.ts +++ b/src/mappers/RecipeInstructionStepDtoEntityMapper.ts @@ -1,4 +1,4 @@ -import { RecipeInstructionStepDto } from "../dtos/RecipeInstructionStepDto.js"; +import { RecipeInstructionStepDto } from "../api/dtos/RecipeInstructionStepDto.js"; import { RecipeInstructionStepEntity } from "../entities/RecipeInstructionStepEntity.js"; import { AbstractDtoEntityMapper } from "./AbstractDtoEntityMapper.js"; diff --git a/src/mappers/UserDtoEntityMapper.ts b/src/mappers/UserDtoEntityMapper.ts index 675f2fa..7a5a277 100644 --- a/src/mappers/UserDtoEntityMapper.ts +++ b/src/mappers/UserDtoEntityMapper.ts @@ -1,6 +1,6 @@ import { AbstractDtoEntityMapper } from "./AbstractDtoEntityMapper.js"; import { UserEntity } from "../entities/UserEntity.js"; -import { UserDto } from "../dtos/UserDto.js"; +import { UserDto } from "../api/dtos/UserDto.js"; export class UserDtoEntityMapper extends AbstractDtoEntityMapper { toDto(entity: UserEntity): UserDto { diff --git a/src/middleware/authenticationMiddleware.ts b/src/middleware/authenticationMiddleware.ts index 27715e8..fbd74dd 100644 --- a/src/middleware/authenticationMiddleware.ts +++ b/src/middleware/authenticationMiddleware.ts @@ -1,9 +1,9 @@ import { NextFunction, Request, Response } from "express"; import jwt from "jsonwebtoken"; import dotenv from "dotenv"; -import { authBasicRoute } from "../endpoints/AuthRestResource.js"; -import { AuthPayload } from "../dtos/AuthPayload.js"; -import {HttpStatusCode} from "../apiHelpers/HttpStatusCodes.js"; +import { authBasicRoute } from "../api/endpoints/AuthRestResource.js"; +import { AuthPayload } from "../api/dtos/AuthPayload.js"; +import {HttpStatusCode} from "../api/apiHelpers/HttpStatusCodes.js"; dotenv.config(); diff --git a/src/middleware/authorizationMiddleware.ts b/src/middleware/authorizationMiddleware.ts index d2ff8db..df98d05 100644 --- a/src/middleware/authorizationMiddleware.ts +++ b/src/middleware/authorizationMiddleware.ts @@ -1,7 +1,7 @@ import { NextFunction, Request, Response } from "express"; -import { ForbiddenError } from "../errors/httpErrors.js"; -import { HttpStatusCode } from "../apiHelpers/HttpStatusCodes.js"; -import { UserRole } from "../enums/UserRole.js"; +import { ForbiddenError } from "../api/errors/httpErrors.js"; +import { HttpStatusCode } from "../api/apiHelpers/HttpStatusCodes.js"; +import { UserRole } from "../api/enums/UserRole.js"; /** * Middleware to check if the current user has one of the required roles diff --git a/src/middleware/corsMiddleware.ts b/src/middleware/corsMiddleware.ts index e7597a0..71aab14 100644 --- a/src/middleware/corsMiddleware.ts +++ b/src/middleware/corsMiddleware.ts @@ -1,5 +1,5 @@ import { Request, Response, NextFunction } from "express"; -import {HttpStatusCode} from "../apiHelpers/HttpStatusCodes.js"; +import {HttpStatusCode} from "../api/apiHelpers/HttpStatusCodes.js"; /** * Add CORS header diff --git a/src/middleware/errorHandler.ts b/src/middleware/errorHandler.ts index 1b335d3..6673a7b 100644 --- a/src/middleware/errorHandler.ts +++ b/src/middleware/errorHandler.ts @@ -1,6 +1,6 @@ // middleware/errorHandler.ts import { Request, Response, NextFunction } from "express"; -import { HttpError, InternalServerError } from "../errors/httpErrors.js"; +import { HttpError, InternalServerError } from "../api/errors/httpErrors.js"; /** * Express global error-handling middleware. diff --git a/src/middleware/errorLoggerMiddleware.ts b/src/middleware/errorLoggerMiddleware.ts index 094fb2a..0ecc0de 100644 --- a/src/middleware/errorLoggerMiddleware.ts +++ b/src/middleware/errorLoggerMiddleware.ts @@ -1,7 +1,7 @@ import { Request, Response, NextFunction } from "express"; -import { HttpError } from "../errors/httpErrors.js"; +import { HttpError } from "../api/errors/httpErrors.js"; import { logger } from "../utils/logger.js"; -import { HttpStatusCode } from "../apiHelpers/HttpStatusCodes.js"; +import { HttpStatusCode } from "../api/apiHelpers/HttpStatusCodes.js"; /** * Error logging and handling middleware diff --git a/src/utils/encryptionUtils.ts b/src/utils/encryptionUtils.ts index b64e629..c622db6 100644 --- a/src/utils/encryptionUtils.ts +++ b/src/utils/encryptionUtils.ts @@ -1,7 +1,7 @@ import jwt from "jsonwebtoken"; import bcrypt from "bcrypt"; import dotenv from "dotenv"; -import { AuthPayload } from "../dtos/AuthPayload.js"; +import { AuthPayload } from "../api/dtos/AuthPayload.js"; dotenv.config(); const { JWT_SECRET = "" } = process.env; diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 77a747b..7f3b061 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,6 +1,6 @@ import winston from "winston"; import path from "path"; -import { HttpStatusCode } from "../apiHelpers/HttpStatusCodes.js"; +import { HttpStatusCode } from "../api/apiHelpers/HttpStatusCodes.js"; // Define log format const logFormat = winston.format.combine(