--
This commit is contained in:
parent
c12320d60f
commit
915f178ac3
@ -1,53 +0,0 @@
|
|||||||
import { makeRequest } from "@frontend/kitui";
|
|
||||||
import { CreateQuestionRequest } from "model/question/create";
|
|
||||||
import { RawQuestion } from "model/question/question";
|
|
||||||
import {
|
|
||||||
GetQuestionListRequest,
|
|
||||||
GetQuestionListResponse,
|
|
||||||
} from "@model/question/getList";
|
|
||||||
import {
|
|
||||||
EditQuestionRequest,
|
|
||||||
EditQuestionResponse,
|
|
||||||
} from "@model/question/edit";
|
|
||||||
import {
|
|
||||||
DeleteQuestionRequest,
|
|
||||||
DeleteQuestionResponse,
|
|
||||||
} from "@model/question/delete";
|
|
||||||
import {
|
|
||||||
CopyQuestionRequest,
|
|
||||||
CopyQuestionResponse,
|
|
||||||
} from "@model/question/copy";
|
|
||||||
|
|
||||||
const baseUrl = process.env.REACT_APP_DOMAIN;
|
|
||||||
|
|
||||||
function get(quizId: string) {
|
|
||||||
return makeRequest<any>({
|
|
||||||
url: `${baseUrl}/question/copy`,
|
|
||||||
body: { id: questionId, quiz_id: quizId },
|
|
||||||
method: "POST",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function quizRelase(quizId: string, status: "start" | "stop") {
|
|
||||||
return makeRequest<any>({
|
|
||||||
url: process.env.REACT_APP_DOMAIN + `/answer/quiz/get`,
|
|
||||||
body: {
|
|
||||||
quiz_id: quizId,
|
|
||||||
limit: 100,
|
|
||||||
page: 0,
|
|
||||||
need_config: true,
|
|
||||||
},
|
|
||||||
method: "POST",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export const relaseApi = {
|
|
||||||
relase: quizRelase,
|
|
||||||
get: quizRelase,
|
|
||||||
};
|
|
||||||
|
|
||||||
const defaultGetQuestionListBody: GetQuestionListRequest = {
|
|
||||||
limit: 100,
|
|
||||||
offset: 0,
|
|
||||||
type: "",
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user