Spaces:
Paused
Paused
Download fronted/src/services/mockTestService.js from phuc7/linguaielts-api: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/spaces/phuc7/linguaielts-api/resolve/main/fronted/src/services/mockTestService.js
- Command line
-
hf download hf://spaces/phuc7/linguaielts-api/fronted/src/services/mockTestService.js
-
curl -L -o mockTestService.js https://huggingface.co/spaces/phuc7/linguaielts-api/resolve/main/fronted/src/services/mockTestService.js
561 Bytes
| import apiClient from '@/api/client.js' | |
| export async function listMockTests({ skillId } = {}) { | |
| const params = {} | |
| if (skillId) params.skill_id = skillId | |
| const res = await apiClient.get('/mock-tests', { params, timeout: 30000 }) | |
| return res.data?.data ?? [] | |
| } | |
| export async function getMockTest(id) { | |
| const res = await apiClient.get(`/mock-tests/${id}`) | |
| return res.data?.data | |
| } | |
| export async function getQuiz(quizId) { | |
| const res = await apiClient.get(`/quizzes/${quizId}`, { timeout: 45000 }) | |
| const body = res.data | |
| return body?.data ?? body | |
| } | |