renaming model to schemas and created model folder

This commit is contained in:
Kfir Dayan 2023-06-20 19:44:43 +03:00
parent b59e652c9b
commit 8cbca86205
10 changed files with 8 additions and 7 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -1,7 +1,7 @@
import { Request, Response } from 'express'; import { Request, Response } from 'express';
import { Cart, ICart } from '../schemas/cartModel'; import { Cart, ICart } from '../schemas/cartSchema';
import { Product } from '../schemas/productModel'; import { Product } from '../schemas/productSchema';
import { Order } from '../schemas/orderModel'; import { Order } from '../schemas/orderSchema';
import { sendEmailasync } from '../services/sendGrid'; import { sendEmailasync } from '../services/sendGrid';
import { config } from 'dotenv'; import { config } from 'dotenv';

View file

@ -1,5 +1,5 @@
import { Request, Response } from 'express'; import { Request, Response } from 'express';
import { Product } from '../schemas/productModel'; import { Product } from '../schemas/productSchema';
import { handleCreateProductError } from '../middlewares/errorHandlers'; import { handleCreateProductError } from '../middlewares/errorHandlers';

View file

@ -1,7 +1,7 @@
import { Request, Response } from 'express'; import { Request, Response } from 'express';
import bcrypt from 'bcryptjs'; import bcrypt from 'bcryptjs';
import jwt from 'jsonwebtoken'; import jwt from 'jsonwebtoken';
import { User, IUser } from '../schemas/userModel'; import { User, IUser } from '../schemas/userSchema';
import { clearJwtCookie, setJwtCookie } from '../middlewares/checkAuth'; import { clearJwtCookie, setJwtCookie } from '../middlewares/checkAuth';
import validate from 'deep-email-validator'; import validate from 'deep-email-validator';

1
src/models/userModel.ts Normal file
View file

@ -0,0 +1 @@
import { User, IUser } from "../schemas/userSchema";

View file

@ -1,6 +1,6 @@
import { config } from "dotenv"; import { config } from "dotenv";
import { Order } from "../schemas/orderModel"; import { Order } from "../schemas/orderSchema";
import { User } from "../schemas/userModel"; import { User } from "../schemas/userSchema";
import client from '@sendgrid/mail'; import client from '@sendgrid/mail';
config(); config();