Skip to content

Commit 43f5f62

Browse files
committed
finishes #187988989 adding enable2FA field to response
1 parent 68276a0 commit 43f5f62

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"license": "ISC",
2626
"dependencies": {
2727
"@types/express-winston": "^4.0.0",
28+
"@types/morgan": "^1.9.9",
2829
"@types/passport-jwt": "^4.0.1",
2930
"@types/winston": "^2.4.4",
3031
"bcrypt": "^5.1.1",
@@ -88,6 +89,7 @@
8889
"husky": "^8.0.3",
8990
"jest": "^29.7.0",
9091
"lint-staged": "^15.2.2",
92+
"morgan": "^1.10.0",
9193
"ncp": "^2.0.0",
9294
"nodemon": "^3.1.0",
9395
"prettier": "^3.2.5",

src/controllers/userController.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const getOneUser = async (req: Request, res: Response) => {
143143
const { id } = req.params;
144144
const user: User | null = await User.findOne({
145145
where: { id },
146-
attributes: ['id', 'firstName', 'lastName', 'email', 'phoneNumber', 'photoUrl', 'gender'],
146+
attributes: ['id', 'firstName', 'lastName', 'email', 'phoneNumber', 'photoUrl', 'gender', 'enable2FA'],
147147
include: {
148148
model: Role,
149149
attributes: ['name'],

src/server.ts

+2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ import scheduledTasks from './config/cornJobs';
1515
import { socketSetUp } from './chatSetup';
1616
import { IncomingMessage } from 'http';
1717

18+
import morgan from 'morgan';
1819
dotenv.config();
1920

2021
export const app: Application = express();
2122

23+
if (process.env.NODE_ENV === 'development') app.use(morgan('dev'));
2224
app.use(cors());
2325
app.use(passport.initialize());
2426
app.use(

0 commit comments

Comments
 (0)