Skip to content

Commit

Permalink
finishes #187988989 adding enable2FA field to response
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanIrad committed Jul 21, 2024
1 parent 68276a0 commit 43f5f62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"license": "ISC",
"dependencies": {
"@types/express-winston": "^4.0.0",
"@types/morgan": "^1.9.9",
"@types/passport-jwt": "^4.0.1",
"@types/winston": "^2.4.4",
"bcrypt": "^5.1.1",
Expand Down Expand Up @@ -88,6 +89,7 @@
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"morgan": "^1.10.0",
"ncp": "^2.0.0",
"nodemon": "^3.1.0",
"prettier": "^3.2.5",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/userController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const getOneUser = async (req: Request, res: Response) => {
const { id } = req.params;
const user: User | null = await User.findOne({
where: { id },
attributes: ['id', 'firstName', 'lastName', 'email', 'phoneNumber', 'photoUrl', 'gender'],
attributes: ['id', 'firstName', 'lastName', 'email', 'phoneNumber', 'photoUrl', 'gender', 'enable2FA'],
include: {
model: Role,
attributes: ['name'],
Expand Down
2 changes: 2 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ import scheduledTasks from './config/cornJobs';
import { socketSetUp } from './chatSetup';
import { IncomingMessage } from 'http';

import morgan from 'morgan';
dotenv.config();

export const app: Application = express();

if (process.env.NODE_ENV === 'development') app.use(morgan('dev'));
app.use(cors());
app.use(passport.initialize());
app.use(
Expand Down

0 comments on commit 43f5f62

Please sign in to comment.