Hozifa Elgharbawy commited on
Commit
6099975
·
1 Parent(s): 5981b95
Dockerfile CHANGED
@@ -14,10 +14,10 @@ RUN npm install
14
  COPY . .
15
 
16
  # Build the TypeScript code
17
- RUN npm run build
18
 
19
  # Expose the port on which your application will run
20
  EXPOSE 4000
21
 
22
  # Command to run the application
23
- CMD ["npm", "start"]
 
14
  COPY . .
15
 
16
  # Build the TypeScript code
17
+ # RUN npm run build
18
 
19
  # Expose the port on which your application will run
20
  EXPOSE 4000
21
 
22
  # Command to run the application
23
+ CMD ["npm", "start:dev"]
src/common/validations/user-register.validation.ts CHANGED
@@ -7,7 +7,7 @@ import { PreferredDay } from "@common/enums/preferred-day.enum";
7
  import { PreferredEquipment } from "@common/enums/preferred-equipment.enum";
8
  import { WorkoutPlace } from "@common/enums/workout-place.enum";
9
  import * as joi from "joi";
10
- import { createSchema } from "src/helpers/create-schema";
11
 
12
  export interface IUserRegister {
13
  name: string;
 
7
  import { PreferredEquipment } from "@common/enums/preferred-equipment.enum";
8
  import { WorkoutPlace } from "@common/enums/workout-place.enum";
9
  import * as joi from "joi";
10
+ import { createSchema } from "@helpers/create-schema";
11
 
12
  export interface IUserRegister {
13
  name: string;
src/configs/config.ts CHANGED
@@ -1,5 +1,5 @@
1
  import dotenv from "dotenv";
2
- import { Env } from "src/lib/env/env";
3
  dotenv.config();
4
 
5
  export interface Config {
 
1
  import dotenv from "dotenv";
2
+ import { Env } from "@lib/env/env";
3
  dotenv.config();
4
 
5
  export interface Config {
src/modules/console/modules/admins/validations/create-admin.validation.ts CHANGED
@@ -1,6 +1,6 @@
1
  import { Role } from "@common/enums/role.enum";
2
  import * as joi from "joi";
3
- import { createSchema } from "src/helpers/create-schema";
4
 
5
  export interface ICreateAdmin {
6
  name: string;
 
1
  import { Role } from "@common/enums/role.enum";
2
  import * as joi from "joi";
3
+ import { createSchema } from "@helpers/create-schema";
4
 
5
  export interface ICreateAdmin {
6
  name: string;
src/modules/console/modules/users/controllers/users.controller.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { userRegisterSchema } from "src/common/validations/user-register.validation";
2
  import { UsersService } from "../services/users.service";
3
- import { JsonResponse } from "src/lib/responses/json-response";
4
  import { Request, Response } from "express";
5
  import { asyncHandler } from "@helpers/async-handler";
6
  import { bodyValidator } from "@helpers/validation.helper";
 
1
+ import { userRegisterSchema } from "@common/validations/user-register.validation";
2
  import { UsersService } from "../services/users.service";
3
+ import { JsonResponse } from "@lib/responses/json-response";
4
  import { Request, Response } from "express";
5
  import { asyncHandler } from "@helpers/async-handler";
6
  import { bodyValidator } from "@helpers/validation.helper";
src/modules/users/auth/controllers/auth.controller.ts CHANGED
@@ -1,8 +1,8 @@
1
  import { UsersAuthService } from "../services/users.service";
2
  import { loginValidationSchema } from "../validation/login.validation";
3
  import { Request, Response } from "express";
4
- import { JsonResponse } from "src/lib/responses/json-response";
5
- import { userRegisterSchema, IUserRegister } from "src/common/validations/user-register.validation";
6
  import { asyncHandler } from "@helpers/async-handler";
7
  import { bodyValidator } from "@helpers/validation.helper";
8
  import { BaseController } from "@lib/controllers/controller.base";
 
1
  import { UsersAuthService } from "../services/users.service";
2
  import { loginValidationSchema } from "../validation/login.validation";
3
  import { Request, Response } from "express";
4
+ import { JsonResponse } from "@lib/responses/json-response";
5
+ import { userRegisterSchema, IUserRegister } from "@common/validations/user-register.validation";
6
  import { asyncHandler } from "@helpers/async-handler";
7
  import { bodyValidator } from "@helpers/validation.helper";
8
  import { BaseController } from "@lib/controllers/controller.base";
src/modules/users/auth/services/users.service.ts CHANGED
@@ -1,9 +1,9 @@
1
  import bcrypt from "bcrypt";
2
  import { ILogin } from "../validation/login.validation";
3
- import { HttpError } from "src/lib/error-handling/http-error";
4
- import { JwtHelper } from "src/helpers/jwt.helper";
5
- import { userModel } from "src/common/models/user.model";
6
- import { IUserRegister } from "src/common/validations/user-register.validation";
7
  import { CrudService } from "@lib/services/crud.service";
8
 
9
  export class UsersAuthService extends CrudService(userModel) {
 
1
  import bcrypt from "bcrypt";
2
  import { ILogin } from "../validation/login.validation";
3
+ import { HttpError } from "@lib/error-handling/http-error";
4
+ import { JwtHelper } from "@helpers/jwt.helper";
5
+ import { userModel } from "@common/models/user.model";
6
+ import { IUserRegister } from "@common/validations/user-register.validation";
7
  import { CrudService } from "@lib/services/crud.service";
8
 
9
  export class UsersAuthService extends CrudService(userModel) {
src/modules/users/auth/validation/login.validation.ts CHANGED
@@ -1,5 +1,5 @@
1
  import joi from "joi";
2
- import { createSchema } from "src/helpers/create-schema";
3
 
4
  export interface ILogin {
5
  email: string;
 
1
  import joi from "joi";
2
+ import { createSchema } from "@helpers/create-schema";
3
 
4
  export interface ILogin {
5
  email: string;