File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed
Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 11import config from "../../config/config" ;
22
33import { Request , Response } from "express" ;
4- import User , { IUser } from "../../models/User" ;
4+ import { IUser } from "../../models/IUser" ;
5+ import User from "../../models/User" ;
56import bcrypt from "bcrypt" ;
67import jwt from "jsonwebtoken" ;
78
Original file line number Diff line number Diff line change 1+ import { Document } from 'mongoose'
2+
3+ export interface IUser extends Document {
4+ displayName : string ;
5+ username : string ;
6+ email : string ;
7+ password : string ;
8+ avatar : string ;
9+ role : string ;
10+ status : boolean ;
11+ }
Original file line number Diff line number Diff line change 1- import { model , Schema , Document } from "mongoose" ;
1+ import { model , Schema } from "mongoose" ;
22import bcrypt from "bcrypt" ;
3-
4- export interface IUser extends Document {
5- displayName : string ;
6- username : string ;
7- email : string ;
8- password : string ;
9- avatar : string ;
10- role : string ;
11- status : boolean ;
12- }
3+ import { IUser } from "./IUser" ;
134
145const UserSchema = new Schema (
156 {
You can’t perform that action at this time.
0 commit comments