mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 20:09:25 +00:00
12 lines
487 B
TypeScript
12 lines
487 B
TypeScript
import { getAPIUrl } from '@services/config/config'
|
|
import { RequestBody, RequestBodyWithAuthHeader } from '@services/utils/ts/requests'
|
|
|
|
export async function submitQuizBlock(activity_id: string, data: any,access_token:string) {
|
|
const result: any = await fetch(
|
|
`${getAPIUrl()}blocks/quiz/${activity_id}"`,
|
|
RequestBodyWithAuthHeader('POST', data, null,access_token)
|
|
)
|
|
.then((result) => result.json())
|
|
.catch((error) => console.log('error', error))
|
|
return result
|
|
}
|