feat: reformat utility req functions to use next

This commit is contained in:
swve 2023-05-19 09:08:02 +00:00
parent 1f6020efc0
commit bb0f9166f9
14 changed files with 43 additions and 41 deletions

View file

@ -3,7 +3,7 @@ import { RequestBody, RequestBodyForm } from "@services/utils/ts/requests";
export async function submitQuizBlock(activity_id: string, data: any) {
const result: any = await fetch(`${getAPIUrl()}blocks/quiz/${activity_id}"`, RequestBody("POST", data))
const result: any = await fetch(`${getAPIUrl()}blocks/quiz/${activity_id}"`, RequestBody("POST", data, null))
.then((result) => result.json())
.catch((error) => console.log("error", error));
return result;