Skip to content

Commit

Permalink
sorted question as response
Browse files Browse the repository at this point in the history
  • Loading branch information
dedsecrattle committed Oct 3, 2024
1 parent 3b5c9d2 commit 45d4ae0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/services/question.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default class QuestionService {

static async getQuestions(): Promise<Question[]> {
const response = await QuestionService.client.get("/");
return response.data;
let questions = response.data.sort((a: Question, b: Question) => a.questionId - b.questionId);
return questions;
}

static async addQuestion(
Expand Down

0 comments on commit 45d4ae0

Please sign in to comment.