File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -200,15 +200,14 @@ export const readQuestionsList = async (
200
200
res . status ( 404 ) . json ( { message : QN_NOT_FOUND_MESSAGE } ) ;
201
201
return ;
202
202
}
203
- const filteredTotalPages = Math . ceil ( filteredTotalQuestions / qnLimitInt ) ;
204
203
205
204
const filteredQuestions = await Question . find ( query )
206
205
. skip ( ( pageInt - 1 ) * qnLimitInt )
207
206
. limit ( qnLimitInt ) ;
208
207
209
208
res . status ( 200 ) . json ( {
210
209
message : QN_RETRIEVED_MESSAGE ,
211
- pages : filteredTotalPages ,
210
+ totalQns : filteredTotalQuestions ,
212
211
questions : filteredQuestions ,
213
212
} ) ;
214
213
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -176,9 +176,9 @@ paths:
176
176
message :
177
177
type : string
178
178
description : Message
179
- pages :
179
+ totalQns :
180
180
type : integer
181
- description : Total number of pages of questions
181
+ description : Total number of questions
182
182
questions :
183
183
type : array
184
184
items :
You can’t perform that action at this time.
0 commit comments