Skip to content

Commit

Permalink
Merge pull request #96 from GitVivekHub/dev
Browse files Browse the repository at this point in the history
[BE] #Task 0000 Question list api response modifications
  • Loading branch information
ankush-maherwal authored Dec 19, 2024
2 parents 8197de3 + 0e9e648 commit 793db03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 3 additions & 7 deletions src/adapters/diksha/quml.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export class QumlQuestionService implements IServicelocator {
request: any
) {}
bulkImport(request: any, questionDto: [Object]) {}
async getQuestionList(request: any, body: any,limit:string) {
async getQuestionList(request: any, body: any, limit: string) {
try {
var axios = require("axios");
var config = {
Expand All @@ -519,16 +519,12 @@ export class QumlQuestionService implements IServicelocator {
"Content-Type": "application/json",
},
data: body,
limit:limit
limit: limit,
};

const responseData = await axios(config);
const data = responseData.data;
return new SuccessResponse({
statusCode: 200,
message: "Ok",
data: data.result.questions,
});
return data;
} catch (error) {
return new ErrorResponse({
errorCode: "500",
Expand Down
10 changes: 3 additions & 7 deletions src/adapters/sunbird/quml.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export class QumlQuestionService implements IServicelocator {
request: any
) {}
bulkImport(request: any, questionDto: [Object]) {}
async getQuestionList(request: any, body: any,limit:string) {
async getQuestionList(request: any, body: any, limit: string) {
try {
var axios = require("axios");
var config = {
Expand All @@ -519,16 +519,12 @@ export class QumlQuestionService implements IServicelocator {
"Content-Type": "application/json",
},
data: body,
limit
limit,
};

const responseData = await axios(config);
const data = responseData.data;
return new SuccessResponse({
statusCode: 200,
message: "Ok",
data: data.result.questions,
});
return data;
} catch (error) {
return new ErrorResponse({
errorCode: "500",
Expand Down

0 comments on commit 793db03

Please sign in to comment.