fix: revert to get only the questions from the current user
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import AxeRepository from "./axeRepository";
|
||||
import QuestionRepository from "~/repositories/questionRepository";
|
||||
import QuizRepository from "~/repositories/quizRepository";
|
||||
import QuestionRepository from "~/repositories/questionRepository";
|
||||
|
||||
const repositories = {
|
||||
axe: AxeRepository,
|
||||
question: QuestionRepository,
|
||||
quiz: QuizRepository,
|
||||
question: QuestionRepository,
|
||||
// other repositories ...
|
||||
};
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import {RestResponse} from "~/repositories/models/rest-response.model";
|
||||
import {$axios} from "~/utils/api";
|
||||
import {AxeWithQuestions} from "~/repositories/models/axe.model";
|
||||
import {Axe} from "~/repositories/models/axe.model";
|
||||
|
||||
export default {
|
||||
findAll() {
|
||||
return $axios.get<RestResponse<AxeWithQuestions>>("/axes/search/me");
|
||||
return $axios.get<RestResponse<Axe>>("/axes");
|
||||
}
|
||||
}
|
||||
|
@@ -11,11 +11,11 @@ export default {
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
response.data._embedded.questions.forEach(question => {
|
||||
question.id = Number(question._links.self.href.split("/").reverse()[0]);
|
||||
return question;
|
||||
response.data._embedded.questions.forEach(question => {
|
||||
question.id = Number(question._links.self.href.split("/").reverse()[0]);
|
||||
return question;
|
||||
});
|
||||
return response;
|
||||
});
|
||||
return response;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user