mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: use session access_tokens
This commit is contained in:
parent
08cc97f557
commit
52f2235942
74 changed files with 413 additions and 440 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { getAPIUrl } from '@services/config/config'
|
||||
import { RequestBody } from '@services/utils/ts/requests'
|
||||
import { RequestBody, RequestBodyWithAuthHeader } from '@services/utils/ts/requests'
|
||||
|
||||
export async function submitQuizBlock(activity_id: string, data: any) {
|
||||
export async function submitQuizBlock(activity_id: string, data: any,access_token:string) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}blocks/quiz/${activity_id}"`,
|
||||
RequestBody('POST', data, null)
|
||||
RequestBodyWithAuthHeader('POST', data, null,access_token)
|
||||
)
|
||||
.then((result) => result.json())
|
||||
.catch((error) => console.log('error', error))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue