15 lines
388 B
TypeScript
15 lines
388 B
TypeScript
import axiosInstance from "./axiosInstance";
|
|
import { Pagination, QuestionResponse } from "./types";
|
|
|
|
export const get_questions = async (page: number, test_id?: number, question_id?: number) => {
|
|
const response = await axiosInstance.get<Pagination<QuestionResponse>>("/api/questions/", {
|
|
params: {
|
|
page,
|
|
test_id,
|
|
question_id
|
|
}
|
|
})
|
|
|
|
return response.data;
|
|
}
|